JBoss Tools SVN: r3263 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-08-21 15:52:47 -0400 (Tue, 21 Aug 2007)
New Revision: 3263
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java
Log:
Fix swalowing of original exceptions.
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java 2007-08-21 19:42:32 UTC (rev 3262)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/ScannerTest.java 2007-08-21 19:52:47 UTC (rev 3263)
@@ -47,6 +47,7 @@
import org.jboss.tools.seam.internal.core.scanner.LoadedDeclarations;
import org.jboss.tools.seam.internal.core.scanner.lib.ClassPath;
import org.jboss.tools.seam.internal.core.scanner.lib.LibraryScanner;
+import org.jboss.tools.test.util.JUnitUtils;
public class ScannerTest extends TestCase {
TestProjectProvider provider = null;
@@ -61,12 +62,12 @@
try {
project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
} catch (Exception e) {
- e.printStackTrace();
+ JUnitUtils.fail("Error in refreshing",e);
}
try {
XJob.waitForJob();
} catch (InterruptedException e) {
- //ignore
+ JUnitUtils.fail("Interrupted",e);
}
}
@@ -74,24 +75,24 @@
try {
XJob.waitForJob();
} catch (Exception e) {
- fail("Interrupted");
+ JUnitUtils.fail("Interrupted",e);
}
try {
project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
try {
XJob.waitForJob();
} catch (InterruptedException e) {
- System.out.println("Interruption ignored");
+ JUnitUtils.fail("Interrupted",e);
}
} catch (Exception e) {
e.printStackTrace();
- fail("Cannot build");
+ JUnitUtils.fail("Cannot build",e);
}
ISeamProject seamProject = null;
try {
seamProject = (ISeamProject)project.getNature(SeamProject.NATURE_ID);
} catch (Exception e) {
- fail("Cannot get seam nature.");
+ JUnitUtils.fail("Cannot get seam nature.",e);
}
assertNotNull("Seam project is null", seamProject);
return seamProject;
@@ -126,7 +127,7 @@
cs = ds.getComponents().toArray(new ISeamComponentDeclaration[0]);
fs = ds.getFactories().toArray(new ISeamFactory[0]);
} catch (Exception e) {
- fail("Error in xml scanner:" + e.getMessage());
+ JUnitUtils.fail("Error in xml scanner",e);
}
assertTrue("Components are not found in components.xml", cs != null && cs.length > 0);
@@ -223,7 +224,7 @@
cs = ds.getComponents().toArray(new ISeamComponentDeclaration[0]);
fs = ds.getFactories().toArray(new ISeamFactory[0]);
} catch (Exception e) {
- fail("Error in java scanner:" + e.getMessage());
+ JUnitUtils.fail("Error in java scanner",e);
}
assertTrue("Components are not found in User.java", cs != null && cs.length > 0);
@@ -307,7 +308,7 @@
factories = ds.getFactories().toArray(new ISeamFactory[0]);
componentDeclarations = ds.getComponents().toArray(new ISeamJavaComponentDeclaration[0]);
} catch (Exception e) {
- fail("Error in library scanner:" + e.getMessage());
+ JUnitUtils.fail("Error in library scanner",e);
}
assertTrue("Factories are not found in jboss-seam.jar", factories != null && factories.length > 0);
@@ -320,7 +321,7 @@
project.build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
XJob.waitForJob();
} catch (Exception e) {
- fail("Cannot build");
+ JUnitUtils.fail("Cannot build",e);
}
//After having tested details of library scanner now let us check
17 years, 5 months
JBoss Tools SVN: r3262 - trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-08-21 15:42:32 -0400 (Tue, 21 Aug 2007)
New Revision: 3262
Modified:
trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/PlugInLoadTest.java
Log:
Fix test errors
Modified: trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/PlugInLoadTest.java
===================================================================
--- trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/PlugInLoadTest.java 2007-08-21 19:37:47 UTC (rev 3261)
+++ trunk/tests/tests/org.jboss.tools.test/src/org/jboss/tools/tests/PlugInLoadTest.java 2007-08-21 19:42:32 UTC (rev 3262)
@@ -134,8 +134,6 @@
jbideNS+"jdt.j2ee.core",
jbideNS+"jdt.j2ee.ui",
jbideNS+"jdt.j2ee.xml.ui",
- jbideNS+"jdt.test.core",
- jbideNS+"jdt.test.ui",
jbideNS+"jdt.ui",
jbideNS+"jdt.ws.core",
jbideNS+"jdt.ws.ui",
17 years, 5 months
JBoss Tools SVN: r3261 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui: wizards and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-08-21 15:37:47 -0400 (Tue, 21 Aug 2007)
New Revision: 3261
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java
Log:
Cosmetic
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2007-08-21 19:22:08 UTC (rev 3260)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2007-08-21 19:37:47 UTC (rev 3261)
@@ -35,6 +35,7 @@
public static String wizardFragmentConfigLabel;
public static String runtimeWizardFragmentExplanation;
public static String serverWizardFragmentExplanation;
+ public static String serverWizardFragmentExplanation2;
public static String serverNameInUse;
public static String runtimeNameInUse;
public static String invalidDirectory;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2007-08-21 19:22:08 UTC (rev 3260)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2007-08-21 19:37:47 UTC (rev 3261)
@@ -15,7 +15,8 @@
browse=Browse...
deployDirectory=Deploy Directory
runtimeWizardFragmentExplanation=A JBoss Server runtime references a JBoss installation directory.\nIt can be used to set up classpaths for projects which depend on this runtime,\nas well as by a "server" which will be able to start and stop instances of JBoss.
-serverWizardFragmentExplanation=A JBoss Server manages starting and stopping instances of JBoss. \nIt manages command line arguments and keeps track of which modules have been deployed.\n\n If the information below is incorrect, please press\nback, Installed Runtimes..., and then Add to create a new runtime from a different location.
+serverWizardFragmentExplanation=A JBoss Server manages starting and stopping instances of JBoss. \nIt manages command line arguments and keeps track of which modules have been deployed.
+serverWizardFragmentExplanation2=If the runtime information below is incorrect, please press back, Installed Runtimes..., \nand then Add to create a new runtime from a different location.
#Server View (server and categories, properties)
property=Property
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java 2007-08-21 19:22:08 UTC (rev 3260)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossServerWizardFragment.java 2007-08-21 19:37:47 UTC (rev 3261)
@@ -60,7 +60,7 @@
public class JBossServerWizardFragment extends WizardFragment {
private IWizardHandle handle;
- private Label nameLabel, explanationLabel;
+ private Label nameLabel, explanationLabel, explanationLabel2;
private Label homeDirLabel, installedJRELabel, configLabel;
private Label homeValLabel, jreValLabel, configValLabel;
private String runtimeLoc, configName;
@@ -175,12 +175,23 @@
}
private void createRuntimeGroup(Composite main) {
+ // explanation 2
+ explanationLabel2 = new Label(main, SWT.NONE);
+ explanationLabel2.setText(Messages.serverWizardFragmentExplanation2);
+ FormData labelData = new FormData();
+ labelData.left = new FormAttachment(0,5);
+ labelData.right = new FormAttachment(100, -5);
+ labelData.top = new FormAttachment(nameComposite, 15);
+ explanationLabel2.setLayoutData(labelData);
+
+
+
g = new Group(main, SWT.NONE);
g.setText(Messages.runtimeInformation);
FormData groupData = new FormData();
groupData.left = new FormAttachment(0,5);
groupData.right = new FormAttachment(100, -5);
- groupData.top = new FormAttachment(nameComposite, 5);
+ groupData.top = new FormAttachment(explanationLabel2, 5);
g.setLayoutData(groupData);
g.setLayout(new GridLayout(2, false));
17 years, 5 months
JBoss Tools SVN: r3260 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-08-21 15:22:08 -0400 (Tue, 21 Aug 2007)
New Revision: 3260
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
Log:
JBIDE-679 fixed
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2007-08-21 18:23:00 UTC (rev 3259)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/wizards/JBossRuntimeWizardFragment.java 2007-08-21 19:22:08 UTC (rev 3260)
@@ -71,21 +71,23 @@
* @author Stryker
*/
public class JBossRuntimeWizardFragment extends WizardFragment {
-
+
private final static int NAME_CHANGED = 1;
private final static int HOME_CHANGED = 2;
private final static int JRE_CHANGED = 3;
private final static int CONFIG_CHANGED = 4;
-
+
private final static int SEVERITY_ALL = 1;
private final static int SEVERITY_MAJOR = 2;
-
+
private IWizardHandle handle;
- private Label nameLabel, homeDirLabel, installedJRELabel, configLabel, explanationLabel;
+ private Label nameLabel, homeDirLabel, installedJRELabel, configLabel,
+ explanationLabel;
private Text nameText, homeDirText;
private Combo jreCombo;
private Button homeDirButton, jreButton;
- private Composite nameComposite, homeDirComposite, jreComposite, configComposite;
+ private Composite nameComposite, homeDirComposite, jreComposite,
+ configComposite;
private String name, homeDir, config;
// jre fields
@@ -95,18 +97,17 @@
private JBossConfigurationTableViewer configurations;
- private IVMInstall selectedVM;
+ private IVMInstall selectedVM;
private boolean pristine;
private String originalName;
-
- public Composite createComposite(Composite parent, IWizardHandle handle)
- {
+
+ public Composite createComposite(Composite parent, IWizardHandle handle) {
this.handle = handle;
-
+
Composite main = new Composite(parent, SWT.NONE);
main.setLayout(new FormLayout());
-
+
updateJREs();
createExplanation(main);
createNameComposite(main);
@@ -116,209 +117,223 @@
// If it's an already filled runtime (ie not new) fill our widgets
pristine = isPristineRuntime();
- if( !pristine ) {
+ if (!pristine) {
fillWidgets();
} else {
setWidgetDefaults();
}
- //initTaskModel();
-
-
+ // initTaskModel();
+
// make modifications to parent
handle.setTitle(Messages.createRuntimeWizardTitle);
handle.setImageDescriptor(getImageDescriptor());
return main;
}
-
+
protected ImageDescriptor getImageDescriptor() {
- IRuntime rt = (IRuntime)getTaskModel().getObject(TaskModel.TASK_RUNTIME);
+ IRuntime rt = (IRuntime) getTaskModel().getObject(
+ TaskModel.TASK_RUNTIME);
String id = rt.getRuntimeType().getId();
String imageKey = "";
- if( id.equals("org.jboss.ide.eclipse.as.runtime.32")) imageKey = JBossServerUISharedImages.WIZBAN_JBOSS32_LOGO;
- else if( id.equals("org.jboss.ide.eclipse.as.runtime.40")) imageKey = JBossServerUISharedImages.WIZBAN_JBOSS40_LOGO;
- else if( id.equals("org.jboss.ide.eclipse.as.runtime.42")) imageKey = JBossServerUISharedImages.WIZBAN_JBOSS42_LOGO;
+ if (id.equals("org.jboss.ide.eclipse.as.runtime.32"))
+ imageKey = JBossServerUISharedImages.WIZBAN_JBOSS32_LOGO;
+ else if (id.equals("org.jboss.ide.eclipse.as.runtime.40"))
+ imageKey = JBossServerUISharedImages.WIZBAN_JBOSS40_LOGO;
+ else if (id.equals("org.jboss.ide.eclipse.as.runtime.42"))
+ imageKey = JBossServerUISharedImages.WIZBAN_JBOSS42_LOGO;
return JBossServerUISharedImages.getImageDescriptor(imageKey);
}
private void fillWidgets() {
RuntimeWorkingCopy rwc = getRuntimeWorkingCopy();
- if( rwc != null ) {
+ if (rwc != null) {
originalName = rwc.getName();
nameText.setText(rwc.getName());
homeDirText.setText(rwc.getLocation().toOSString());
- String configSelected = rwc.getAttribute(IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME, "");
+ String configSelected = rwc.getAttribute(
+ IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME, "");
configurations.setDefaultConfiguration(configSelected);
-
+
configurations.getTable().setVisible(false);
- configLabel.setText(Messages.wizardFragmentConfigLabel + ": " + configSelected);
+ configLabel.setText(Messages.wizardFragmentConfigLabel + ": "
+ + configSelected);
homeDirText.setEditable(false);
homeDirButton.setEnabled(false);
-
+
try {
- Object o = rwc.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
- if( o != null ) {
- IJBossServerRuntime jbsr = (IJBossServerRuntime)o;
+ Object o = rwc.loadAdapter(IJBossServerRuntime.class,
+ new NullProgressMonitor());
+ if (o != null) {
+ IJBossServerRuntime jbsr = (IJBossServerRuntime) o;
IVMInstall install = jbsr.getVM();
String vmName = install.getName();
String[] jres = jreCombo.getItems();
- for( int i = 0; i < jres.length; i++ ) {
- if( vmName.equals(jres[i]))
+ for (int i = 0; i < jres.length; i++) {
+ if (vmName.equals(jres[i]))
jreCombo.select(i);
}
}
- } catch( Exception e ) {
-
+ } catch (Exception e) {
+
}
-
+
}
}
-
+
private void setWidgetDefaults() {
nameText.setText(generateNewRuntimeName());
- homeDirText.setText( Platform.getOS().equals( Platform.WS_WIN32 ) ?
- "c:/program files/jboss-" + getRuntimeVersionId() + ".x" :
- "/usr/bin/jboss-" + getRuntimeVersionId() + ".x");
+ homeDirText
+ .setText(Platform.getOS().equals(Platform.WS_WIN32) ? "c:/program files/jboss-"
+ + getRuntimeVersionId() + ".x"
+ : "/usr/bin/jboss-" + getRuntimeVersionId() + ".x");
}
-
+
public String getVersion() {
- IRuntime rt = (IRuntime)getTaskModel().getObject(TaskModel.TASK_RUNTIME);
+ IRuntime rt = (IRuntime) getTaskModel().getObject(
+ TaskModel.TASK_RUNTIME);
String id = rt.getRuntimeType().getId();
- if( id.equals("org.jboss.ide.eclipse.as.runtime.32")) return "3.2";
- else if( id.equals("org.jboss.ide.eclipse.as.runtime.40")) return "4.0";
- else if( id.equals("org.jboss.ide.eclipse.as.runtime.42")) return "4.2";
+ if (id.equals("org.jboss.ide.eclipse.as.runtime.32"))
+ return "3.2";
+ else if (id.equals("org.jboss.ide.eclipse.as.runtime.40"))
+ return "4.0";
+ else if (id.equals("org.jboss.ide.eclipse.as.runtime.42"))
+ return "4.2";
return ""; // default
}
private String generateNewRuntimeName() {
String base = "JBoss " + getVersion() + " runtime";
IRuntime rt = ServerCore.findRuntime(base);
- if( rt == null ) return base;
-
+ if (rt == null)
+ return base;
+
int i = 0;
- while( rt != null ) {
+ while (rt != null) {
rt = ServerCore.findRuntime(base + " " + ++i);
}
return base + " " + i;
}
-
+
private RuntimeWorkingCopy getRuntimeWorkingCopy() {
- IRuntime r = (IRuntime) getTaskModel().getObject(TaskModel.TASK_RUNTIME);
+ IRuntime r = (IRuntime) getTaskModel()
+ .getObject(TaskModel.TASK_RUNTIME);
IRuntimeWorkingCopy wc;
- if( !(r instanceof IRuntimeWorkingCopy )) {
+ if (!(r instanceof IRuntimeWorkingCopy)) {
wc = r.createWorkingCopy();
- } else { wc = (IRuntimeWorkingCopy)r; }
-
- if( wc instanceof RuntimeWorkingCopy ) {
- RuntimeWorkingCopy rwc = (RuntimeWorkingCopy)wc;
+ } else {
+ wc = (IRuntimeWorkingCopy) r;
+ }
+
+ if (wc instanceof RuntimeWorkingCopy) {
+ RuntimeWorkingCopy rwc = (RuntimeWorkingCopy) wc;
return rwc;
}
return null;
}
-
+
private String getRuntimeVersionId() {
RuntimeWorkingCopy rwc = getRuntimeWorkingCopy();
- try {
- Object o = rwc.loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
- if( o != null ) {
- IJBossServerRuntime jbsr = (IJBossServerRuntime)o;
+ if( rwc != null ) {
+ Object o = rwc.loadAdapter(IJBossServerRuntime.class,
+ new NullProgressMonitor());
+ if (o != null) {
+ IJBossServerRuntime jbsr = (IJBossServerRuntime) o;
return jbsr.getId();
}
- } catch( Exception e ) {
}
return "4.0";
}
+
private boolean isPristineRuntime() {
RuntimeWorkingCopy rwc = getRuntimeWorkingCopy();
- if( rwc != null ) {
- if( rwc.getAttribute(IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME, (String)null) == null ) {
+ if (rwc != null) {
+ if (rwc.getAttribute(
+ IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME,
+ (String) null) == null) {
return true;
}
return false;
}
- // uncertain... its not internal... what is it? :: flails ::
return true;
}
-
+
private void createExplanation(Composite main) {
explanationLabel = new Label(main, SWT.WRAP);
FormData data = new FormData();
- data.top = new FormAttachment(0,5);
- data.left = new FormAttachment(0,5);
- data.right = new FormAttachment(100,-5);
+ data.top = new FormAttachment(0, 5);
+ data.left = new FormAttachment(0, 5);
+ data.right = new FormAttachment(100, -5);
explanationLabel.setLayoutData(data);
-
+
explanationLabel.setText(Messages.runtimeWizardFragmentExplanation);
}
-
+
private void createNameComposite(Composite main) {
// Create our name composite
nameComposite = new Composite(main, SWT.NONE);
-
+
FormData cData = new FormData();
- cData.left = new FormAttachment(0,5);
- cData.right = new FormAttachment(100,-5);
+ cData.left = new FormAttachment(0, 5);
+ cData.right = new FormAttachment(100, -5);
cData.top = new FormAttachment(explanationLabel, 10);
nameComposite.setLayoutData(cData);
-
+
nameComposite.setLayout(new FormLayout());
-
// create internal widgets
nameLabel = new Label(nameComposite, SWT.NONE);
nameLabel.setText(Messages.wizardFragmentNameLabel);
-
+
nameText = new Text(nameComposite, SWT.BORDER);
nameText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
updatePage(NAME_CHANGED);
- }
-
+ }
+
});
-
+
// organize widgets inside composite
FormData nameLabelData = new FormData();
- nameLabelData.left = new FormAttachment(0,0);
+ nameLabelData.left = new FormAttachment(0, 0);
nameLabel.setLayoutData(nameLabelData);
-
+
FormData nameTextData = new FormData();
nameTextData.left = new FormAttachment(0, 5);
nameTextData.right = new FormAttachment(100, -5);
nameTextData.top = new FormAttachment(nameLabel, 5);
nameText.setLayoutData(nameTextData);
}
-
+
private void createHomeComposite(Composite main) {
// Create our composite
homeDirComposite = new Composite(main, SWT.NONE);
-
+
FormData cData = new FormData();
- cData.left = new FormAttachment(0,5);
- cData.right = new FormAttachment(100,-5);
+ cData.left = new FormAttachment(0, 5);
+ cData.right = new FormAttachment(100, -5);
cData.top = new FormAttachment(nameComposite, 10);
homeDirComposite.setLayoutData(cData);
homeDirComposite.setLayout(new FormLayout());
-
-
+
// Create Internal Widgets
homeDirLabel = new Label(homeDirComposite, SWT.NONE);
homeDirLabel.setText(Messages.wizardFragmentHomeDirLabel);
-
+
homeDirText = new Text(homeDirComposite, SWT.BORDER);
-
+
homeDirButton = new Button(homeDirComposite, SWT.NONE);
homeDirButton.setText(Messages.browse);
-
// Add listeners
homeDirText.addModifyListener(new ModifyListener() {
public void modifyText(ModifyEvent e) {
updatePage(HOME_CHANGED);
}
});
-
+
homeDirButton.addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
browseHomeDirClicked();
@@ -326,24 +341,23 @@
public void widgetSelected(SelectionEvent e) {
browseHomeDirClicked();
- }
-
+ }
+
});
-
+
// Set Layout Data
FormData labelData = new FormData();
FormData textData = new FormData();
FormData buttonData = new FormData();
-
- labelData.left = new FormAttachment(0,0);
+
+ labelData.left = new FormAttachment(0, 0);
homeDirLabel.setLayoutData(labelData);
-
-
+
textData.left = new FormAttachment(0, 5);
textData.right = new FormAttachment(homeDirButton, -5);
textData.top = new FormAttachment(homeDirLabel, 5);
homeDirText.setLayoutData(textData);
-
+
buttonData.top = new FormAttachment(homeDirLabel, 5);
buttonData.right = new FormAttachment(100, 0);
homeDirButton.setLayoutData(buttonData);
@@ -352,27 +366,26 @@
private void createJREComposite(Composite main) {
// Create our composite
jreComposite = new Composite(main, SWT.NONE);
-
+
FormData cData = new FormData();
- cData.left = new FormAttachment(0,5);
- cData.right = new FormAttachment(100,-5);
+ cData.left = new FormAttachment(0, 5);
+ cData.right = new FormAttachment(100, -5);
cData.top = new FormAttachment(homeDirComposite, 10);
jreComposite.setLayoutData(cData);
jreComposite.setLayout(new FormLayout());
-
-
+
// Create Internal Widgets
installedJRELabel = new Label(jreComposite, SWT.NONE);
installedJRELabel.setText(Messages.wizardFragmentJRELabel);
-
+
jreCombo = new Combo(jreComposite, SWT.DROP_DOWN | SWT.READ_ONLY);
jreCombo.setItems(jreNames);
jreCombo.select(defaultVMIndex);
-
+
jreButton = new Button(jreComposite, SWT.NONE);
jreButton.setText(Messages.installedJREs);
-
+
// Add action listeners
jreButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
@@ -394,115 +407,117 @@
public void widgetSelected(SelectionEvent e) {
updatePage(JRE_CHANGED);
- }
- } );
-
+ }
+ });
+
// Set Layout Data
FormData labelData = new FormData();
FormData comboData = new FormData();
FormData buttonData = new FormData();
-
- labelData.left = new FormAttachment(0,0);
+
+ labelData.left = new FormAttachment(0, 0);
installedJRELabel.setLayoutData(labelData);
-
-
+
comboData.left = new FormAttachment(0, 5);
comboData.right = new FormAttachment(jreButton, -5);
comboData.top = new FormAttachment(installedJRELabel, 5);
jreCombo.setLayoutData(comboData);
-
+
buttonData.top = new FormAttachment(installedJRELabel, 5);
buttonData.right = new FormAttachment(100, 0);
jreButton.setLayoutData(buttonData);
}
-
private void updatePage(int changed) {
- switch( changed ) {
- case NAME_CHANGED:
- updateErrorMessage(SEVERITY_MAJOR);
- break;
- case HOME_CHANGED:
- if (! new File(homeDirText.getText()).exists()) {
+ switch (changed) {
+ case NAME_CHANGED:
+ updateErrorMessage(SEVERITY_MAJOR);
+ break;
+ case HOME_CHANGED:
+ if (!isHomeValid()) {
configurations.getControl().setEnabled(false);
+ configurations.setJBossHome(homeDirText.getText());
} else {
- // No errors, clear the message and update the available configurations
+ // No errors, clear the message and update the available
+ // configurations
configurations.setJBossHome(homeDirText.getText());
configurations.setDefaultConfiguration("default");
// update config variable
int index = configurations.getTable().getSelectionIndex();
- if( index != -1 )
+ if (index != -1)
config = configurations.getTable().getItem(index).getText();
}
- updateErrorMessage(SEVERITY_MAJOR);
- break;
- case JRE_CHANGED:
- int sel = jreCombo.getSelectionIndex();
- if( sel != -1 )
- selectedVM = (IVMInstall) installedJREs.get(sel);
- break;
- default:
- break;
+ updateErrorMessage(SEVERITY_MAJOR);
+ break;
+ case JRE_CHANGED:
+ int sel = jreCombo.getSelectionIndex();
+ if (sel != -1)
+ selectedVM = (IVMInstall) installedJREs.get(sel);
+ break;
+ default:
+ break;
}
}
private void updateErrorMessage(int severity) {
String error = getErrorString(severity);
- if( error == null ) {
+ if (error == null) {
handle.setMessage(null, IMessageProvider.NONE);
return;
}
handle.setMessage(error, IMessageProvider.ERROR);
}
-
+
private String getErrorString(int severity) {
- if( getRuntime(nameText.getText()) != null ) {
+ if (getRuntime(nameText.getText()) != null) {
return Messages.runtimeNameInUse;
}
-
- if ( homeDirText.getText() != "" && !new File(homeDirText.getText()).exists()) {
+
+ if (!isHomeValid())
return Messages.invalidDirectory;
- }
-
- if( severity == SEVERITY_MAJOR ) return null;
-
+
+ if (severity == SEVERITY_MAJOR)
+ return null;
+
// now give minor warnings
- if( nameText.getText().equals(""))
+ if (nameText.getText().equals(""))
return Messages.nameTextBlank;
- if( homeDirText.getText().equals(""))
+ if (homeDirText.getText().equals(""))
return Messages.homeDirBlank;
-
return null;
+ }
+ protected boolean isHomeValid() {
+ return new Path(homeDirText.getText()).append("bin").append("run.jar")
+ .toFile().exists();
}
-
private void browseHomeDirClicked() {
File file = new File(homeDirText.getText());
- if (! file.exists()) {
+ if (!file.exists()) {
file = null;
}
-
+
File directory = getDirectory(file, homeDirComposite.getShell());
if (directory == null) {
return;
}
-
+
homeDirText.setText(directory.getAbsolutePath());
}
-
+
protected File getDirectory(File startingDirectory, Shell shell) {
DirectoryDialog fileDialog = new DirectoryDialog(shell, SWT.OPEN);
if (startingDirectory != null) {
fileDialog.setFilterPath(startingDirectory.getPath());
}
-
+
String dir = fileDialog.open();
if (dir != null) {
dir = dir.trim();
@@ -512,14 +527,19 @@
}
return null;
}
-
+
// Other
protected boolean showPreferencePage() {
- PreferenceManager manager = PlatformUI.getWorkbench().getPreferenceManager();
- IPreferenceNode node = manager.find("org.eclipse.jdt.ui.preferences.JavaBasePreferencePage").findSubNode("org.eclipse.jdt.debug.ui.preferences.VMPreferencePage");
+ PreferenceManager manager = PlatformUI.getWorkbench()
+ .getPreferenceManager();
+ IPreferenceNode node = manager
+ .find("org.eclipse.jdt.ui.preferences.JavaBasePreferencePage")
+ .findSubNode(
+ "org.eclipse.jdt.debug.ui.preferences.VMPreferencePage");
PreferenceManager manager2 = new PreferenceManager();
manager2.addToRoot(node);
- final PreferenceDialog dialog = new PreferenceDialog(jreButton.getShell(), manager2);
+ final PreferenceDialog dialog = new PreferenceDialog(jreButton
+ .getShell(), manager2);
final boolean[] result = new boolean[] { false };
BusyIndicator.showWhile(jreButton.getDisplay(), new Runnable() {
public void run() {
@@ -530,8 +550,7 @@
});
return result[0];
}
-
-
+
// JRE methods
protected void updateJREs() {
// get all installed JVMs
@@ -545,7 +564,7 @@
installedJREs.add(vmInstalls[j]);
}
}
-
+
// get names
size = installedJREs.size();
jreNames = new String[size];
@@ -553,13 +572,12 @@
IVMInstall vmInstall = (IVMInstall) installedJREs.get(i);
jreNames[i] = vmInstall.getName();
}
-
+
selectedVM = JavaRuntime.getDefaultVMInstall();
defaultVMIndex = installedJREs.indexOf(selectedVM);
-
}
-
+
// WST API methods
public void enter() {
}
@@ -567,54 +585,59 @@
public void exit() {
name = nameText.getText();
homeDir = homeDirText.getText();
- IRuntime r = (IRuntime) getTaskModel().getObject(TaskModel.TASK_RUNTIME);
+ IRuntime r = (IRuntime) getTaskModel()
+ .getObject(TaskModel.TASK_RUNTIME);
IRuntimeWorkingCopy runtimeWC;
- if( r instanceof IRuntimeWorkingCopy ) {
- runtimeWC = (IRuntimeWorkingCopy)r;
+ if (r instanceof IRuntimeWorkingCopy) {
+ runtimeWC = (IRuntimeWorkingCopy) r;
} else {
runtimeWC = r.createWorkingCopy();
}
runtimeWC.setName(name);
runtimeWC.setLocation(new Path(homeDir));
- ((RuntimeWorkingCopy)runtimeWC).setAttribute(IJBossServerRuntime.PROPERTY_VM_ID, selectedVM.getId());
- ((RuntimeWorkingCopy)runtimeWC).setAttribute(IJBossServerRuntime.PROPERTY_VM_TYPE_ID, selectedVM.getVMInstallType().getId());
- ((RuntimeWorkingCopy)runtimeWC).setAttribute(IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME, configurations.getSelectedConfiguration());
+ ((RuntimeWorkingCopy) runtimeWC).setAttribute(
+ IJBossServerRuntime.PROPERTY_VM_ID, selectedVM.getId());
+ ((RuntimeWorkingCopy) runtimeWC).setAttribute(
+ IJBossServerRuntime.PROPERTY_VM_TYPE_ID, selectedVM
+ .getVMInstallType().getId());
+ ((RuntimeWorkingCopy) runtimeWC).setAttribute(
+ IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME, configurations
+ .getSelectedConfiguration());
getTaskModel().putObject(TaskModel.TASK_RUNTIME, runtimeWC);
}
-
+
private void createConfigurationComposite(Composite main) {
configComposite = new Composite(main, SWT.NONE);
-
+
FormData cData = new FormData();
- cData.left = new FormAttachment(0,5);
- cData.right = new FormAttachment(100,-5);
+ cData.left = new FormAttachment(0, 5);
+ cData.right = new FormAttachment(100, -5);
cData.top = new FormAttachment(jreComposite, 10);
cData.bottom = new FormAttachment(100, -5);
configComposite.setLayoutData(cData);
configComposite.setLayout(new FormLayout());
-
-
+
configLabel = new Label(configComposite, SWT.NONE);
configLabel.setText(Messages.wizardFragmentConfigLabel);
- configurations = new JBossConfigurationTableViewer(configComposite,
+ configurations = new JBossConfigurationTableViewer(configComposite,
SWT.BORDER | SWT.SINGLE);
-
+
FormData labelData = new FormData();
- labelData.left = new FormAttachment(0,5);
+ labelData.left = new FormAttachment(0, 5);
configLabel.setLayoutData(labelData);
-
+
FormData viewerData = new FormData();
viewerData.left = new FormAttachment(0, 5);
viewerData.right = new FormAttachment(100, -5);
viewerData.top = new FormAttachment(configLabel, 5);
viewerData.bottom = new FormAttachment(100, -5);
-
+
configurations.getTable().setLayoutData(viewerData);
-
+
configurations.getTable().addSelectionListener(new SelectionListener() {
public void widgetDefaultSelected(SelectionEvent e) {
@@ -623,22 +646,27 @@
public void widgetSelected(SelectionEvent e) {
updatePage(CONFIG_CHANGED);
- }
-
- } );
+ }
+ });
+
}
+ public void performFinish(IProgressMonitor monitor) throws CoreException {
- public void performFinish(IProgressMonitor monitor) throws CoreException {
-
- IRuntime r = (IRuntime) getTaskModel().getObject(TaskModel.TASK_RUNTIME);
+ IRuntime r = (IRuntime) getTaskModel()
+ .getObject(TaskModel.TASK_RUNTIME);
IRuntimeWorkingCopy runtimeWC = r.createWorkingCopy();
runtimeWC.setName(name);
runtimeWC.setLocation(new Path(homeDir));
- ((RuntimeWorkingCopy)runtimeWC).setAttribute(IJBossServerRuntime.PROPERTY_VM_ID, selectedVM.getId());
- ((RuntimeWorkingCopy)runtimeWC).setAttribute(IJBossServerRuntime.PROPERTY_VM_TYPE_ID, selectedVM.getVMInstallType().getId());
- ((RuntimeWorkingCopy)runtimeWC).setAttribute(IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME, configurations.getSelectedConfiguration());
+ ((RuntimeWorkingCopy) runtimeWC).setAttribute(
+ IJBossServerRuntime.PROPERTY_VM_ID, selectedVM.getId());
+ ((RuntimeWorkingCopy) runtimeWC).setAttribute(
+ IJBossServerRuntime.PROPERTY_VM_TYPE_ID, selectedVM
+ .getVMInstallType().getId());
+ ((RuntimeWorkingCopy) runtimeWC).setAttribute(
+ IJBossServerRuntime.PROPERTY_CONFIGURATION_NAME, configurations
+ .getSelectedConfiguration());
IRuntime saved = runtimeWC.save(false, new NullProgressMonitor());
getTaskModel().putObject(TaskModel.TASK_RUNTIME, saved);
@@ -652,13 +680,15 @@
public boolean hasComposite() {
return true;
}
-
+
private IRuntime getRuntime(String runtimeName) {
- if( runtimeName.equals(originalName)) return null; // name is same as original. No clash.
-
+ if (runtimeName.equals(originalName))
+ return null; // name is same as original. No clash.
+
IRuntime[] runtimes = ServerCore.getRuntimes();
- for( int i = 0; i < runtimes.length; i++ ) {
- if( runtimes[i].getName().equals(runtimeName)) return runtimes[i];
+ for (int i = 0; i < runtimes.length; i++) {
+ if (runtimes[i].getName().equals(runtimeName))
+ return runtimes[i];
}
return null;
}
17 years, 5 months
JBoss Tools SVN: r3259 - trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-08-21 14:23:00 -0400 (Tue, 21 Aug 2007)
New Revision: 3259
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE13ClasspathContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE14ClasspathContainerInitializer.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE50ClasspathContainerInitializer.java
Log:
Static inner classes.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE13ClasspathContainerInitializer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE13ClasspathContainerInitializer.java 2007-08-21 18:08:53 UTC (rev 3258)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE13ClasspathContainerInitializer.java 2007-08-21 18:23:00 UTC (rev 3259)
@@ -39,7 +39,7 @@
return J2EE13ClasspathContainer.CLASSPATH_CONTAINER;
}
- public class J2EE13ClasspathContainer extends AbstractClasspathContainer {
+ public static class J2EE13ClasspathContainer extends AbstractClasspathContainer {
public final static String SUFFIX = "j2ee-1.3";//$NON-NLS-1$
public final static String CLASSPATH_CONTAINER = CLASSPATH_CONTAINER_PREFIX
+ "." + J2EE13ClasspathContainer.SUFFIX;//$NON-NLS-1$
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE14ClasspathContainerInitializer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE14ClasspathContainerInitializer.java 2007-08-21 18:08:53 UTC (rev 3258)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE14ClasspathContainerInitializer.java 2007-08-21 18:23:00 UTC (rev 3259)
@@ -18,7 +18,7 @@
return J2EE14ClasspathContainer.CLASSPATH_CONTAINER;
}
- public class J2EE14ClasspathContainer extends AbstractClasspathContainer {
+ public static class J2EE14ClasspathContainer extends AbstractClasspathContainer {
public final static String SUFFIX = "j2ee-1.4";//$NON-NLS-1$
public final static String CLASSPATH_CONTAINER = CLASSPATH_CONTAINER_PREFIX
+ "." + J2EE14ClasspathContainer.SUFFIX;//$NON-NLS-1$
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE50ClasspathContainerInitializer.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE50ClasspathContainerInitializer.java 2007-08-21 18:08:53 UTC (rev 3258)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/jee/J2EE50ClasspathContainerInitializer.java 2007-08-21 18:23:00 UTC (rev 3259)
@@ -18,7 +18,7 @@
return J2EE50ClasspathContainer.CLASSPATH_CONTAINER;
}
- public class J2EE50ClasspathContainer extends AbstractClasspathContainer {
+ public static class J2EE50ClasspathContainer extends AbstractClasspathContainer {
public final static String SUFFIX = "javaee-5.0";//$NON-NLS-1$
public final static String CLASSPATH_CONTAINER = CLASSPATH_CONTAINER_PREFIX
+ "." + J2EE50ClasspathContainer.SUFFIX;//$NON-NLS-1$
17 years, 5 months
JBoss Tools SVN: r3258 - trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2007-08-21 14:08:53 -0400 (Tue, 21 Aug 2007)
New Revision: 3258
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF
Log:
http://jira.jboss.org/jira/browse/RHDS-110 Create Welcome screen
new packages are exported for runtime
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF 2007-08-21 18:01:36 UTC (rev 3257)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF 2007-08-21 18:08:53 UTC (rev 3258)
@@ -50,6 +50,7 @@
org.jboss.tools.common.model.ui
Eclipse-LazyStart: true
Export-Package: org.jboss.tools.seam.ui,
+ org.jboss.tools.seam.ui.actions,
org.jboss.tools.seam.ui.builder,
org.jboss.tools.seam.ui.internal.project.facet;x-internal:=true,
org.jboss.tools.seam.ui.preferences,
17 years, 5 months
JBoss Tools SVN: r3257 - in trunk/seam/plugins/org.jboss.tools.seam.ui: src/org/jboss/tools/seam/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2007-08-21 14:01:36 -0400 (Tue, 21 Aug 2007)
New Revision: 3257
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/CreateProjectAction.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUiImages.java
Log:
http://jira.jboss.org/jira/browse/RHDS-110 Create Welcome screen
Create Seam Project Action is added
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF 2007-08-21 17:31:03 UTC (rev 3256)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF 2007-08-21 18:01:36 UTC (rev 3257)
@@ -46,7 +46,8 @@
org.eclipse.datatools.connectivity,
org.eclipse.datatools.connectivity.ui.dse,
org.eclipse.datatools.connectivity.db.generic.ui,
- org.eclipse.datatools.connectivity.db.generic
+ org.eclipse.datatools.connectivity.db.generic,
+ org.jboss.tools.common.model.ui
Eclipse-LazyStart: true
Export-Package: org.jboss.tools.seam.ui,
org.jboss.tools.seam.ui.builder,
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIMessages.java 2007-08-21 18:01:36 UTC (rev 3257)
@@ -0,0 +1,35 @@
+package org.jboss.tools.seam.ui;
+
+import java.util.Locale;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+import org.eclipse.osgi.util.NLS;
+
+public class SeamUIMessages extends NLS {
+ private static final String BUNDLE_NAME = "org.jboss.tools.seam.ui.messages";//$NON-NLS-1$
+
+ private static ResourceBundle fResourceBundle;
+
+ public static String CREATE_NEW_SEAM_PROJECT;
+
+ static {
+ // load message values from bundle file
+ NLS.initializeMessages(BUNDLE_NAME, SeamUIMessages.class);
+ }
+
+ private SeamUIMessages() {
+ // cannot create new instance of this class
+ }
+
+ public static ResourceBundle getResourceBundle() {
+ try {
+ if (fResourceBundle == null)
+ fResourceBundle = ResourceBundle.getBundle(BUNDLE_NAME, Locale.getDefault());
+ }
+ catch (MissingResourceException x) {
+ fResourceBundle = null;
+ }
+ return fResourceBundle;
+ }
+}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUiImages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUiImages.java 2007-08-21 17:31:03 UTC (rev 3256)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUiImages.java 2007-08-21 18:01:36 UTC (rev 3257)
@@ -37,6 +37,9 @@
public static Image JAVA_IMAGE = getImage("view/java.gif");
public static Image JAVA_BINARY_IMAGE = getImage("view/java_binary.gif");
public static Image PACKAGE_IMAGE = getImage("view/package.gif");
+
+ public static String SEAM_CREATE_PROJECT_ACTION = "view/seam_project_new.gif";
+
public static Image getImage(String key) {
return INSTANCE.createImageDescriptor(key).createImage();
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/CreateProjectAction.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/CreateProjectAction.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/actions/CreateProjectAction.java 2007-08-21 18:01:36 UTC (rev 3257)
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+
+package org.jboss.tools.seam.ui.actions;
+
+import org.jboss.tools.common.model.ui.util.ExtensionPointUtils;
+import org.jboss.tools.seam.ui.SeamGuiPlugin;
+import org.jboss.tools.seam.ui.SeamUIMessages;
+import org.jboss.tools.seam.ui.SeamUiImages;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.internal.ide.IIDEHelpContextIds;
+
+/**
+ * @author Jeremy
+ *
+ */
+public class CreateProjectAction extends Action implements IWorkbenchWindowActionDelegate {
+
+ private final static String SEAM_CREATE_PROJECT_WIZARD_ID = "org.jboss.tools.seam.ui.wizards.SeamProjectWizard";
+ /**
+ * The wizard dialog width
+ */
+ private static final int SIZING_WIZARD_WIDTH = 500;
+
+ /**
+ * The wizard dialog height
+ */
+ private static final int SIZING_WIZARD_HEIGHT = 500;
+
+ public CreateProjectAction() {
+ super(SeamUIMessages.CREATE_NEW_SEAM_PROJECT);
+ setToolTipText(SeamUIMessages.CREATE_NEW_SEAM_PROJECT);
+ setImageDescriptor(SeamUiImages.getImageDescriptor(SeamUiImages.SEAM_CREATE_PROJECT_ACTION));
+ }
+
+ public void run() {
+ INewWizard wizard = ExtensionPointUtils.findNewWizardsItem(
+ SeamGuiPlugin.PLUGIN_ID,
+ SEAM_CREATE_PROJECT_WIZARD_ID
+ );
+ if (wizard != null) {
+ wizard.init(PlatformUI.getWorkbench(), null);
+ WizardDialog dialog = new WizardDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), wizard);
+ dialog.create();
+ dialog.getShell().setSize(
+ Math.max(SIZING_WIZARD_WIDTH, dialog.getShell().getSize().x),
+ SIZING_WIZARD_HEIGHT);
+ PlatformUI.getWorkbench().getHelpSystem().setHelp(dialog.getShell(),
+ IIDEHelpContextIds.NEW_PROJECT_WIZARD);
+
+ dialog.open();
+ } else {
+ SeamGuiPlugin.getPluginLog().logError("Unable to create wizard '" + SEAM_CREATE_PROJECT_WIZARD_ID + "'");
+ }
+ }
+
+ public void dispose() {}
+
+ public void init(IWorkbenchWindow window) {}
+
+ public void run(IAction action) {
+ run();
+ }
+
+ public void selectionChanged(IAction action, ISelection selection) {}
+
+}
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/messages.properties 2007-08-21 18:01:36 UTC (rev 3257)
@@ -0,0 +1 @@
+CREATE_NEW_SEAM_PROJECT = Create New Seam Project
17 years, 5 months
JBoss Tools SVN: r3256 - in trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib: j2ee-1.3 and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-08-21 13:31:03 -0400 (Tue, 21 Aug 2007)
New Revision: 3256
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/ejb-api.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/jca-api.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/jms-api.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/jsp-api.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/jta-api.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/servlet-api.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/sql-api.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/ejb-api.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/jacc-api.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/jca-api.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/jms-api.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/jsp-api.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/jta-api.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/servlet-api.jar
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/sql-api.jar
Log:
Classpath jars were not committing
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/ejb-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/ejb-api.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/jca-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/jca-api.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/jms-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/jms-api.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/jsp-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/jsp-api.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/jta-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/jta-api.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/servlet-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/servlet-api.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/sql-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.3/sql-api.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/ejb-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/ejb-api.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/jacc-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/jacc-api.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/jca-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/jca-api.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/jms-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/jms-api.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/jsp-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/jsp-api.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/jta-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/jta-api.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/servlet-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/servlet-api.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/sql-api.jar
===================================================================
(Binary files differ)
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/lib/j2ee-1.4/sql-api.jar
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
17 years, 5 months
JBoss Tools SVN: r3255 - in trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui: src/org/jboss/ide/eclipse/as/classpath/ui and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-08-21 13:28:31 -0400 (Tue, 21 Aug 2007)
New Revision: 3255
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ClasspathUIMessages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/Messages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/JEE50ClasspathContainerPage.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/plugin.xml
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossEJB3LibrariesPage.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/ClasspathContainerPage.java
Log:
Updated classpath pages with messaging
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/plugin.xml 2007-08-21 16:07:08 UTC (rev 3254)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/plugin.xml 2007-08-21 17:28:31 UTC (rev 3255)
@@ -12,15 +12,20 @@
<extension
point="org.eclipse.jdt.ui.classpathContainerPage">
<classpathContainerPage
- name="1.3 libs"
+ name="J2EE 1.3 libraries"
class="org.jboss.ide.eclipse.as.classpath.ui.jee.J2EE13ClasspathContainerPage"
id="org.jboss.ide.eclipse.as.classpath.core.j2ee-1.3">
</classpathContainerPage>
- <classpathContainerPage
- name="1.4 libs"
- class="org.jboss.ide.eclipse.as.classpath.ui.jee.J2EE14ClasspathContainerPage"
- id="org.jboss.ide.eclipse.as.classpath.core.j2ee-1.4">
- </classpathContainerPage>
+ <classpathContainerPage
+ name="J2EE 1.4 libraries"
+ class="org.jboss.ide.eclipse.as.classpath.ui.jee.J2EE14ClasspathContainerPage"
+ id="org.jboss.ide.eclipse.as.classpath.core.j2ee-1.4">
+ </classpathContainerPage>
+ <classpathContainerPage
+ name="JEE 5.0 libraries"
+ class="org.jboss.ide.eclipse.as.classpath.ui.jee.JEE50ClasspathContainerPage"
+ id="org.jboss.ide.eclipse.as.classpath.core.javaee-5.0">
+ </classpathContainerPage>
</extension>
</plugin>
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ClasspathUIMessages.properties
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ClasspathUIMessages.properties (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ClasspathUIMessages.properties 2007-08-21 17:28:31 UTC (rev 3255)
@@ -0,0 +1,6 @@
+jeeClasspathAdding=Adding
+jeeClasspathBody1=Click finish to continue adding
+jeeClasspathBody2= to your project's classpath.
+jeeClasspathDescription=These libraries include the API and Source for the chosen JEE version.
+ejb3ClasspathPageTitle=JBoss EJB 3.0 Libraries
+ejb3ClasspathPageDescription=Add EJB 3.0 Libraries from one of the declared servers.
\ No newline at end of file
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/Messages.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/Messages.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/Messages.java 2007-08-21 17:28:31 UTC (rev 3255)
@@ -0,0 +1,15 @@
+package org.jboss.ide.eclipse.as.classpath.ui;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages {
+ public static String jeeClasspathAdding;
+ public static String jeeClasspathBody1;
+ public static String jeeClasspathBody2;
+ public static String jeeClasspathDescription;
+ public static String ejb3ClasspathPageTitle;
+ public static String ejb3ClasspathPageDescription;
+ static {
+ NLS.initializeMessages(ClasspathUIPlugin.PLUGIN_ID + ".ClasspathUIMessages", Messages.class);
+ }
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossEJB3LibrariesPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossEJB3LibrariesPage.java 2007-08-21 16:07:08 UTC (rev 3254)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/ejb3/JBossEJB3LibrariesPage.java 2007-08-21 17:28:31 UTC (rev 3255)
@@ -28,6 +28,7 @@
import org.jboss.ide.eclipse.as.classpath.core.ejb3.EJB30SupportVerifier;
import org.jboss.ide.eclipse.as.classpath.core.ejb3.EJB3ClasspathContainer;
import org.jboss.ide.eclipse.as.classpath.ui.ClasspathUIPlugin;
+import org.jboss.ide.eclipse.as.classpath.ui.Messages;
import org.jboss.ide.eclipse.as.core.server.JBossServer;
public class JBossEJB3LibrariesPage extends JBossSelectionPage implements IClasspathContainerPage
@@ -37,6 +38,9 @@
public JBossEJB3LibrariesPage() {
super();
+ setTitle(Messages.ejb3ClasspathPageTitle);
+ setDescription(Messages.ejb3ClasspathPageDescription);
+
}
private boolean jbossServerHasEJB3(JBossServer jbossServer) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/ClasspathContainerPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/ClasspathContainerPage.java 2007-08-21 16:07:08 UTC (rev 3254)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/ClasspathContainerPage.java 2007-08-21 17:28:31 UTC (rev 3255)
@@ -21,7 +21,9 @@
*/
package org.jboss.ide.eclipse.as.classpath.ui.jee;
+import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IClasspathEntry;
+import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.ui.wizards.IClasspathContainerPage;
import org.eclipse.jface.wizard.WizardPage;
@@ -30,13 +32,8 @@
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
+import org.jboss.ide.eclipse.as.classpath.ui.Messages;
-/**
- * Description of the Class
- *
- * @author Laurent Etiemble
- * @version $Revision: 1420 $
- */
public abstract class ClasspathContainerPage extends WizardPage implements
IClasspathContainerPage {
private final static String PAGE_NAME = ClasspathContainerPage.class
@@ -48,8 +45,8 @@
super(PAGE_NAME);
this.containerId = id;
this.description = description;
- this.setTitle("Title");//$NON-NLS-1$
- this.setDescription(description);//$NON-NLS-1$
+ this.setTitle(Messages.jeeClasspathAdding + description);
+ this.setDescription(Messages.jeeClasspathDescription);
this.setImageDescriptor(JavaPluginImages.DESC_WIZBAN_ADD_LIBRARY);
}
@@ -65,9 +62,9 @@
top.setLayout(layout);
Label lbl = new Label(top, SWT.NONE);
- lbl
- .setText("ClasspathContainerPage.text.start" + this.getClasspathEntryDescription()
- + ("ClasspathContainerPage.text.end"));//$NON-NLS-1$ //$NON-NLS-2$
+ lbl.setText(Messages.jeeClasspathBody1 +
+ this.getClasspathEntryDescription() +
+ Messages.jeeClasspathBody2);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
lbl.setLayoutData(gd);
@@ -89,7 +86,7 @@
* @return The selection value
*/
public IClasspathEntry getSelection() {
- return null;
+ return JavaCore.newContainerEntry(new Path(containerId), true);
}
/**
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/JEE50ClasspathContainerPage.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/JEE50ClasspathContainerPage.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.ui/src/org/jboss/ide/eclipse/as/classpath/ui/jee/JEE50ClasspathContainerPage.java 2007-08-21 17:28:31 UTC (rev 3255)
@@ -0,0 +1,9 @@
+package org.jboss.ide.eclipse.as.classpath.ui.jee;
+
+import org.jboss.ide.eclipse.as.classpath.core.jee.J2EE50ClasspathContainerInitializer.J2EE50ClasspathContainer;
+
+public class JEE50ClasspathContainerPage extends ClasspathContainerPage {
+ public JEE50ClasspathContainerPage() {
+ super(J2EE50ClasspathContainer.CLASSPATH_CONTAINER, J2EE50ClasspathContainer.DESCRIPTION);
+ }
+}
\ No newline at end of file
17 years, 5 months
JBoss Tools SVN: r3254 - trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/widgets.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-08-21 12:07:08 -0400 (Tue, 21 Aug 2007)
New Revision: 3254
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/widgets/ScrolledComposite.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-774
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/widgets/ScrolledComposite.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/widgets/ScrolledComposite.java 2007-08-21 13:30:13 UTC (rev 3253)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/src/org/jboss/tools/common/model/ui/widgets/ScrolledComposite.java 2007-08-21 16:07:08 UTC (rev 3254)
@@ -153,6 +153,10 @@
}
cr.x = -hs;
}
+ if(hBar.getThumb() >= hBar.getMaximum())
+ hBar.setVisible(false);
+ else
+ hBar.setVisible(true);
}
private void layoutVBar(Rectangle cr, Rectangle hr) {
ScrollBar vBar = getVerticalBar();
@@ -167,6 +171,10 @@
}
cr.y = -vs;
}
+ if(vBar.getThumb() >= vBar.getMaximum())
+ vBar.setVisible(false);
+ else
+ vBar.setVisible(true);
}
public Point computeSize (int wHint, int hHint, boolean changed) {
17 years, 5 months