JBoss Tools SVN: r5384 - in trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor: dnd and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-12-19 19:11:55 -0500 (Wed, 19 Dec 2007)
New Revision: 5384
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/JSFEditor.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/dnd/JSFTemplateTransferDropTargetListener.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/model/impl/Link.java
Log:
Cleanup the code:
1. new Long(value) replaced for Long.valueOf(value)
2. new String() removed
3. new Boolean(true/false) replaced to Boolean.TRUE/FALSE
4. Unused packages were removed from seam.plugins
5. Throwing of NullPointerException replaced to IllegalArgument Exception
6. catch Exception replaced to particular Exception types in several places
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/JSFEditor.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/JSFEditor.java 2007-12-20 00:11:50 UTC (rev 5383)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/JSFEditor.java 2007-12-20 00:11:55 UTC (rev 5384)
@@ -483,9 +483,9 @@
.getLayer(ScalableFreeformRootEditPart.CONNECTION_LAYER))
.setConnectionRouter(new JSFConnectionRouter());
getGraphicalViewer().setProperty(SnapToGrid.PROPERTY_GRID_VISIBLE,
- new Boolean(true));
+ Boolean.TRUE);
getGraphicalViewer().setProperty(SnapToGrid.PROPERTY_GRID_ENABLED,
- new Boolean(true));
+ Boolean.TRUE);
getGraphicalViewer().setProperty(SnapToGrid.PROPERTY_GRID_SPACING,
new Dimension(8, 8));
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/dnd/JSFTemplateTransferDropTargetListener.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/dnd/JSFTemplateTransferDropTargetListener.java 2007-12-20 00:11:50 UTC (rev 5383)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/dnd/JSFTemplateTransferDropTargetListener.java 2007-12-20 00:11:55 UTC (rev 5384)
@@ -26,7 +26,7 @@
class JSFTemplateFactory implements CreationFactory {
public Object getNewObject() {
- return new String("view");
+ return "view";
}
public Object getObjectType() {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/model/impl/Link.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/model/impl/Link.java 2007-12-20 00:11:50 UTC (rev 5383)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/model/impl/Link.java 2007-12-20 00:11:55 UTC (rev 5384)
@@ -85,7 +85,7 @@
}
public void savePointList(PointList list) {
- String value = new String("");
+ String value = "";
for (int i = 0; i < list.size(); i++) {
if (i != 0)
value += ",";
17 years
JBoss Tools SVN: r5383 - in trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web: server and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-12-19 19:11:50 -0500 (Wed, 19 Dec 2007)
New Revision: 5383
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/DeleteTLDHandler.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/RegistrationHelper.java
Log:
Cleanup the code:
1. new Long(value) replaced for Long.valueOf(value)
2. new String() removed
3. new Boolean(true/false) replaced to Boolean.TRUE/FALSE
4. Unused packages were removed from seam.plugins
5. Throwing of NullPointerException replaced to IllegalArgument Exception
6. catch Exception replaced to particular Exception types in several places
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/DeleteTLDHandler.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/DeleteTLDHandler.java 2007-12-20 00:11:44 UTC (rev 5382)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/handlers/DeleteTLDHandler.java 2007-12-20 00:11:50 UTC (rev 5383)
@@ -28,7 +28,7 @@
String message = WebUIMessages.DELETE + FileAnyImpl.toFileName(object);
pd.setProperty(ServiceDialog.DIALOG_MESSAGE, message);
pd.setProperty(ServiceDialog.CHECKBOX_MESSAGE, checkboxMessage);
- pd.put(ServiceDialog.CHECKED, new Boolean(true));
+ pd.put(ServiceDialog.CHECKED, Boolean.TRUE);
if(!d.openConfirm(pd)) return;
Boolean b = (Boolean)pd.get(ServiceDialog.CHECKED);
unregister = b.booleanValue();
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/RegistrationHelper.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/RegistrationHelper.java 2007-12-20 00:11:44 UTC (rev 5382)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/RegistrationHelper.java 2007-12-20 00:11:50 UTC (rev 5383)
@@ -195,9 +195,22 @@
runRegisterInServerJob(p, new IServer[]{server}, null);
}
- public static void runRegisterInServerJob(IProject p, IServer[] servers, String contextRoot) {
- RegisterServerJob job = new RegisterServerJob(p, servers, contextRoot);
- job.schedule(100);
+ public static void runRegisterInServerJob(final IProject p, final IServer[] servers, final String contextRoot) {
+ Job startRegistration = new Job("Starting deployment to server") {
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ RegisterServerJob job = new RegisterServerJob(p, servers, contextRoot);
+ job.schedule(100);
+ return Status.OK_STATUS;
+ }
+ };
+ startRegistration.setUser(true);
+ startRegistration.setRule(p);
+ startRegistration.setPriority(Job.DECORATE);
+ startRegistration.schedule();
}
// registerInJob
17 years
JBoss Tools SVN: r5382 - in trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers: bean and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-12-19 19:11:44 -0500 (Wed, 19 Dec 2007)
New Revision: 5382
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/DeleteFacesConfigHandler.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/DeleteGroupHandler.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/DeleteManagedBeanHandler.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/DeleteRuleHandler.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/bean/DeleteManagedPropertyHandler.java
Log:
Cleanup the code:
1. new Long(value) replaced for Long.valueOf(value)
2. new String() removed
3. new Boolean(true/false) replaced to Boolean.TRUE/FALSE
4. Unused packages were removed from seam.plugins
5. Throwing of NullPointerException replaced to IllegalArgument Exception
6. catch Exception replaced to particular Exception types in several places
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/DeleteFacesConfigHandler.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/DeleteFacesConfigHandler.java 2007-12-20 00:11:39 UTC (rev 5381)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/DeleteFacesConfigHandler.java 2007-12-20 00:11:44 UTC (rev 5382)
@@ -30,7 +30,7 @@
String message = "Delete faces-config " + FileAnyImpl.toFileName(object);
pd.setProperty(ServiceDialog.DIALOG_MESSAGE, message);
pd.setProperty(ServiceDialog.CHECKBOX_MESSAGE, "Delete reference from web.xml");
- pd.put(ServiceDialog.CHECKED, new Boolean(true));
+ pd.put(ServiceDialog.CHECKED, Boolean.TRUE);
if(!d.openConfirm(pd)) return;
Boolean b = (Boolean)pd.get(ServiceDialog.CHECKED);
unregister = b.booleanValue();
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/DeleteGroupHandler.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/DeleteGroupHandler.java 2007-12-20 00:11:39 UTC (rev 5381)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/DeleteGroupHandler.java 2007-12-20 00:11:44 UTC (rev 5382)
@@ -50,7 +50,7 @@
int q = confirmPageDelete(object.getModel(), message);
if(q < 0) return;
deletePage = (q == 0);
- if(p != null) p.put("deletePage", new Boolean(q == 0));
+ if(p != null) p.put("deletePage", Boolean.valueOf(q == 0));
}
g.getModel().changeObjectAttribute(g, "persistent", "false");
XModelObject[] cs = g.getReferences();
@@ -70,7 +70,7 @@
ServiceDialog d = model.getService();
Properties dp = new Properties();
dp.setProperty(ServiceDialog.DIALOG_MESSAGE, message);
- dp.put(ServiceDialog.CHECKED, new Boolean(false));
+ dp.put(ServiceDialog.CHECKED, Boolean.FALSE);
dp.setProperty(ServiceDialog.CHECKBOX_MESSAGE, "Delete file from disk");
if(!d.openConfirm(dp)) return -1;
Boolean b = (Boolean)dp.get(ServiceDialog.CHECKED);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/DeleteManagedBeanHandler.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/DeleteManagedBeanHandler.java 2007-12-20 00:11:39 UTC (rev 5381)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/DeleteManagedBeanHandler.java 2007-12-20 00:11:44 UTC (rev 5382)
@@ -34,7 +34,7 @@
String message = SignificanceMessageFactory.getInstance().getMessage(action, object, null) + "?";
pd.setProperty(ServiceDialog.DIALOG_MESSAGE, message);
pd.setProperty(ServiceDialog.CHECKBOX_MESSAGE, JSFUIMessages.DELETE_JAVA_SOURCE);
- pd.put(ServiceDialog.CHECKED, new Boolean(false));
+ pd.put(ServiceDialog.CHECKED, Boolean.FALSE);
if(!d.openConfirm(pd)) return;
Boolean b = (Boolean)pd.get(ServiceDialog.CHECKED);
unregister = b.booleanValue();
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/DeleteRuleHandler.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/DeleteRuleHandler.java 2007-12-20 00:11:39 UTC (rev 5381)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/DeleteRuleHandler.java 2007-12-20 00:11:44 UTC (rev 5382)
@@ -39,7 +39,7 @@
ServiceDialog d = object.getModel().getService();
Properties dp = new Properties();
dp.setProperty(ServiceDialog.DIALOG_MESSAGE, JSFUIMessages.DELETE + DefaultCreateHandler.title(object, false) + "?");
- dp.put(ServiceDialog.CHECKED, new Boolean(false));
+ dp.put(ServiceDialog.CHECKED, Boolean.FALSE);
dp.setProperty(ServiceDialog.CHECKBOX_MESSAGE, JSFUIMessages.DELETE_FILE_FROM_DISK);
if(!d.openConfirm(dp)) return;
Boolean b = (Boolean)dp.get(ServiceDialog.CHECKED);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/bean/DeleteManagedPropertyHandler.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/bean/DeleteManagedPropertyHandler.java 2007-12-20 00:11:39 UTC (rev 5381)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/bean/DeleteManagedPropertyHandler.java 2007-12-20 00:11:44 UTC (rev 5382)
@@ -38,7 +38,7 @@
p = new Properties();
p.setProperty(ServiceDialog.DIALOG_MESSAGE, message);
p.setProperty(ServiceDialog.CHECKBOX_MESSAGE, "Delete java property");
- p.put(ServiceDialog.CHECKED, new Boolean(false));
+ p.put(ServiceDialog.CHECKED, Boolean.FALSE);
if(!d.openConfirm(p)) return;
Boolean b = (Boolean)p.get(ServiceDialog.CHECKED);
deleteField = (b != null) && b.booleanValue();
17 years
JBoss Tools SVN: r5381 - trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model/handlers.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-12-19 19:11:39 -0500 (Wed, 19 Dec 2007)
New Revision: 5381
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model/handlers/DeleteTilesHandler.java
Log:
Cleanup the code:
1. new Long(value) replaced for Long.valueOf(value)
2. new String() removed
3. new Boolean(true/false) replaced to Boolean.TRUE/FALSE
4. Unused packages were removed from seam.plugins
5. Throwing of NullPointerException replaced to IllegalArgument Exception
6. catch Exception replaced to particular Exception types in several places
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model/handlers/DeleteTilesHandler.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model/handlers/DeleteTilesHandler.java 2007-12-20 00:11:35 UTC (rev 5380)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.tiles/src/org/jboss/tools/jst/web/tiles/model/handlers/DeleteTilesHandler.java 2007-12-20 00:11:39 UTC (rev 5381)
@@ -35,7 +35,7 @@
String message = WebUIMessages.DELETE + FileAnyImpl.toFileName(object);
pd.setProperty(ServiceDialog.DIALOG_MESSAGE, message);
pd.setProperty(ServiceDialog.CHECKBOX_MESSAGE, checkboxMessage);
- pd.put(ServiceDialog.CHECKED, new Boolean(true));
+ pd.put(ServiceDialog.CHECKED, Boolean.TRUE);
if(!d.openConfirm(pd)) return;
Boolean b = (Boolean)pd.get(ServiceDialog.CHECKED);
unregister = b.booleanValue();
17 years
JBoss Tools SVN: r5380 - trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-12-19 19:11:35 -0500 (Wed, 19 Dec 2007)
New Revision: 5380
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizardPage.java
Log:
Cleanup the code:
1. new Long(value) replaced for Long.valueOf(value)
2. new String() removed
3. new Boolean(true/false) replaced to Boolean.TRUE/FALSE
4. Unused packages were removed from seam.plugins
5. Throwing of NullPointerException replaced to IllegalArgument Exception
6. catch Exception replaced to particular Exception types in several places
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizardPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizardPage.java 2007-12-19 19:00:22 UTC (rev 5379)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/NewWebProjectWizardPage.java 2007-12-20 00:11:35 UTC (rev 5380)
@@ -322,7 +322,7 @@
}
class LocalValueProvider implements IValueProvider, IValueChangeListener, IAdaptable {
- protected Object value = new String("");
+ protected Object value = "";
protected PropertyChangeSupport pcs = new PropertyChangeSupport(this);
// listeners
17 years
JBoss Tools SVN: r5379 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2007-12-19 14:00:22 -0500 (Wed, 19 Dec 2007)
New Revision: 5379
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1537 Error in creating seam runtime
The issue is fixed
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java 2007-12-19 17:32:04 UTC (rev 5378)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/widget/editor/SeamRuntimeListFieldEditor.java 2007-12-19 19:00:22 UTC (rev 5379)
@@ -314,9 +314,9 @@
"version", SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_VERSION2, Arrays.asList( //$NON-NLS-1$
new String[]{SeamVersion.SEAM_1_2.toString(), SeamVersion.SEAM_2_0.toString()}),
SeamVersion.SEAM_1_2.toString(), false);
- validSeamVersions = new ArrayList<SeamVersion>();
- validSeamVersions.add(SeamVersion.SEAM_1_2);
- validSeamVersions.add(SeamVersion.SEAM_2_0);
+ this.validSeamVersions = new ArrayList<SeamVersion>();
+ this.validSeamVersions.add(SeamVersion.SEAM_1_2);
+ this.validSeamVersions.add(SeamVersion.SEAM_2_0);
} else {
this.version = IFieldEditorFactory.INSTANCE.createComboEditor(
"version", SeamUIMessages.SEAM_RUNTIME_LIST_FIELD_EDITOR_VERSION2, validSeamVersions,
@@ -368,10 +368,12 @@
name.setValue(homeDirName);
String seamVersion = getSeamVersion(homeDir.getValueAsString());
- for (SeamVersion ver : validSeamVersions) {
- if (seamVersion.matches(ver.toString().replace(".","\\.")+".*")) {
- version.setValue(ver.toString());
- break;
+ if (validSeamVersions != null) {
+ for (SeamVersion ver : validSeamVersions) {
+ if (seamVersion.matches(ver.toString().replace(".","\\.")+".*")) {
+ version.setValue(ver.toString());
+ break;
+ }
}
}
}
17 years
JBoss Tools SVN: r5378 - trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-12-19 12:32:04 -0500 (Wed, 19 Dec 2007)
New Revision: 5378
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1489
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2007-12-19 17:31:45 UTC (rev 5377)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/src/org/jboss/tools/seam/core/test/SeamValidatorsTest.java 2007-12-19 17:32:04 UTC (rev 5378)
@@ -103,6 +103,10 @@
assertTrue("Problem marker 'Duplicate component name' not found","Duplicate component name: abcComponent".equals(messages[0]));
+ int[] lineNumbers = getMarkersNumbersOfLine(bbcComponentFile);
+
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 7);
+
// Stateful component does not contain @Remove method
System.out.println("Test - Stateful component does not contain @Remove method");
@@ -120,6 +124,10 @@
messages = getMarkersMessage(statefulComponentFile);
assertTrue("Problem marker 'Stateful component does not contain @Remove method' not found", "Stateful component \"statefulComponent\" must have a method marked @Remove".equals(messages[0]));
+ lineNumbers = getMarkersNumbersOfLine(statefulComponentFile);
+
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 16);
+
// Stateful component does not contain @Destroy method
System.out.println("Test - Stateful component does not contain @Destroy method");
@@ -137,6 +145,10 @@
messages = getMarkersMessage(statefulComponentFile);
assertTrue("Problem marker 'Stateful component does not contain @Destroy method' not found", "Stateful component \"statefulComponent\" must have a method marked @Destroy".equals(messages[0]));
+ lineNumbers = getMarkersNumbersOfLine(statefulComponentFile);
+
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 16);
+
// Stateful component has wrong scope
System.out.println("Test - Stateful component has wrong scope");
@@ -154,6 +166,10 @@
messages = getMarkersMessage(statefulComponentFile);
assertTrue("Problem marker 'Stateful component has wrong scope' not found", "Stateful component \"statefulComponent\" should not have org.jboss.seam.ScopeType.PAGE, nor org.jboss.seam.ScopeType.STATELESS".equals(messages[0]));
+ lineNumbers = getMarkersNumbersOfLine(statefulComponentFile);
+
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 16);
+
// Component class name cannot be resolved to a type
System.out.println("Test - Component class name cannot be resolved to a type");
@@ -171,6 +187,10 @@
messages = getMarkersMessage(componentsFile);
assertTrue("Problem marker 'Component class name cannot be resolved to a type' not found", "\"org.domain.SeamWebTestProject.session.StateComponent\" cannot be resolved to a type".equals(messages[0]));
+
+ lineNumbers = getMarkersNumbersOfLine(componentsFile);
+
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 15);
// Component class does not contain setter for property
System.out.println("Test - Component class does not contain setter for property");
@@ -199,6 +219,10 @@
messages = getMarkersMessage(componentsFile);
assertTrue("Problem marker 'Component class does not contain setter for property' not found", "Class \"StatefulComponent\" of component \"statefulComponent\" does not contain setter for property \"abc\"".equals(messages[0]));
+
+ lineNumbers = getMarkersNumbersOfLine(componentsFile);
+
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 16);
}
public void testEntitiesValidator() {
@@ -226,7 +250,10 @@
String[] messages = getMarkersMessage(abcEntityFile);
assertTrue("Problem marker 'Entity component has wrong scope' not found", "Entity component \"abcEntity\" should not have org.jboss.seam.ScopeType.STATELESS".equals(messages[0]));
+ int[] lineNumbers = getMarkersNumbersOfLine(abcEntityFile);
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 15);
+
// Duplicate @Remove method
System.out.println("Test - Duplicate @Remove method");
@@ -244,6 +271,18 @@
messages = getMarkersMessage(abcEntityFile);
assertTrue("Problem marker 'Duplicate @Remove method' not found", messages[0].startsWith("Duplicate @Remove method \"removeMethod"));
+ lineNumbers = getMarkersNumbersOfLine(abcEntityFile);
+
+ assertTrue("Wrong number of problem markers", lineNumbers.length == messages.length && messages.length == 2);
+
+ if(messages[1].indexOf("removeMethod2") >= 0){
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 42);
+ assertTrue("Problem marker has wrong line number", lineNumbers[1] == 47);
+ }else{
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 47);
+ assertTrue("Problem marker has wrong line number", lineNumbers[1] == 42);
+
+ }
}
public void testComponentLifeCycleMethodsValidator() {
@@ -272,6 +311,19 @@
String[] messages = getMarkersMessage(statefulComponentFile);
assertTrue("Problem marker 'Duplicate @Destroy method' not found", messages[0].startsWith("Duplicate @Destroy method \"destroyMethod"));
+ int[] lineNumbers = getMarkersNumbersOfLine(statefulComponentFile);
+
+ assertTrue("Wrong number of problem markers", lineNumbers.length == messages.length && messages.length == 2);
+
+ if(messages[1].indexOf("destroyMethod2") >= 0){
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 32);
+ assertTrue("Problem marker has wrong line number", lineNumbers[1] == 38);
+ }else{
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 38);
+ assertTrue("Problem marker has wrong line number", lineNumbers[1] == 32);
+
+ }
+
// Duplicate @Create method
System.out.println("Test - Duplicate @Create method");
@@ -289,6 +341,19 @@
messages = getMarkersMessage(statefulComponentFile);
assertTrue("Problem marker 'Duplicate @Create method' not found", messages[0].startsWith("Duplicate @Create method \"createMethod"));
+ lineNumbers = getMarkersNumbersOfLine(statefulComponentFile);
+
+ assertTrue("Wrong number of problem markers", lineNumbers.length == messages.length && messages.length == 2);
+
+ if(messages[1].indexOf("createMethod2") >= 0){
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 33);
+ assertTrue("Problem marker has wrong line number", lineNumbers[1] == 40);
+ }else{
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 40);
+ assertTrue("Problem marker has wrong line number", lineNumbers[1] == 33);
+
+ }
+
// Duplicate @Unwrap method
System.out.println("Test - Duplicate @Unwrap method");
@@ -306,6 +371,19 @@
messages = getMarkersMessage(statefulComponentFile);
assertTrue("Problem marker 'Duplicate @Unwrap method' not found", messages[0].startsWith("Duplicate @Unwrap method \"unwrapMethod"));
+ lineNumbers = getMarkersNumbersOfLine(statefulComponentFile);
+
+ assertTrue("Wrong number of problem markers", lineNumbers.length == messages.length && messages.length == 2);
+
+ if(messages[1].indexOf("unwrapMethod2") >= 0){
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 39);
+ assertTrue("Problem marker has wrong line number", lineNumbers[1] == 44);
+ }else{
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 44);
+ assertTrue("Problem marker has wrong line number", lineNumbers[1] == 39);
+
+ }
+
// Only component class can have @Destroy method
System.out.println("Test - Only component class can have @Destroy method");
@@ -332,6 +410,10 @@
messages = getMarkersMessage(statefulComponentFile);
assertTrue("Problem marker 'Only component class can have @Destroy method' not found", "Only component class can have @Destroy method \"destroyMethod\"".equals(messages[0]));
+ lineNumbers = getMarkersNumbersOfLine(statefulComponentFile);
+
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 23);
+
// Only component class can have @Create method
System.out.println("Test - Only component class can have @Create method");
@@ -349,6 +431,10 @@
messages = getMarkersMessage(statefulComponentFile);
assertTrue("Problem marker 'Only component class can have @Create method' not found", "Only component class can have @Create method \"createMethod\"".equals(messages[0]));
+ lineNumbers = getMarkersNumbersOfLine(statefulComponentFile);
+
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 23);
+
// Only component class can have @Unwrap method
System.out.println("Test - Only component class can have @Unwrap method");
@@ -366,6 +452,10 @@
messages = getMarkersMessage(statefulComponentFile);
assertTrue("Problem marker 'Only component class can have @Unwrap method' not found", "Only component class can have @Unwrap method \"unwrapMethod\"".equals(messages[0]));
+ lineNumbers = getMarkersNumbersOfLine(statefulComponentFile);
+
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 23);
+
// Only component class can have @Observer method
System.out.println("Test - Only component class can have @Observer method");
@@ -382,6 +472,10 @@
messages = getMarkersMessage(statefulComponentFile);
assertTrue("Problem marker 'Only component class can have @Observer method' not found", "Only component class can have @Observer method \"observerMethod\"".equals(messages[0]));
+
+ lineNumbers = getMarkersNumbersOfLine(statefulComponentFile);
+
+ assertTrue("Problem marker has wrong line number", lineNumbers[0] == 23);
}
public void testFactoriesValidator() {
@@ -430,6 +524,23 @@
}
return messages;
}
+
+ private int[] getMarkersNumbersOfLine(IFile file){
+ int[] numbers = new int[1];
+ numbers[0]=0;
+ try{
+ IMarker[] markers = file.findMarkers(null, true, IResource.DEPTH_INFINITE);
+ numbers = new int[markers.length];
+
+ for(int i=0;i<markers.length;i++){
+ System.out.println("Marker line number - "+markers[i].getAttribute(IMarker.LINE_NUMBER, 0));
+ numbers[i] = markers[i].getAttribute(IMarker.LINE_NUMBER, 0);
+ }
+ }catch(CoreException ex){
+ JUnitUtils.fail("Error in getting problem markers", ex);
+ }
+ return numbers;
+ }
private void refreshProject(IProject project){
long timestamp = project.getModificationStamp();
17 years
JBoss Tools SVN: r5377 - trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/entity.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2007-12-19 12:31:45 -0500 (Wed, 19 Dec 2007)
New Revision: 5377
Modified:
trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/entity/abcEntity.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-1489
Modified: trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/entity/abcEntity.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/entity/abcEntity.java 2007-12-19 16:10:57 UTC (rev 5376)
+++ trunk/seam/tests/org.jboss.tools.seam.core.test/projects/SeamWebWarTestProject/src/action/org/domain/SeamWebWarTestProject/entity/abcEntity.java 2007-12-19 17:31:45 UTC (rev 5377)
@@ -44,11 +44,6 @@
}
- @Remove
- public void removeMethod2(){
-
- }
-
@Length(max=20)
public String getName() {
return name;
17 years
JBoss Tools SVN: r5376 - in trunk/jsf/tests/org.jboss.tools.jsf.test: src/org/jboss/tools/jsf/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-12-19 11:10:57 -0500 (Wed, 19 Dec 2007)
New Revision: 5376
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFImportTest.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
Log:
JBIDE-1223
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF 2007-12-19 16:09:34 UTC (rev 5375)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/META-INF/MANIFEST.MF 2007-12-19 16:10:57 UTC (rev 5376)
@@ -13,8 +13,11 @@
org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.core.resources,
+ org.jboss.tools.tests,
org.jboss.tools.common.test,
org.jboss.tools.common.model,
org.jboss.tools.jsf,
+ org.jboss.tools.jsf.ui,
+ org.jboss.tools.jst.web.ui,
org.jboss.tools.common.model.ui
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFImportTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFImportTest.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JSFImportTest.java 2007-12-19 16:10:57 UTC (rev 5376)
@@ -0,0 +1,102 @@
+package org.jboss.tools.jsf.test;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.net.URL;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.common.model.XModelFactory;
+import org.jboss.tools.common.util.FileUtil;
+import org.jboss.tools.jsf.ui.operation.JSFProjectAdoptOperation;
+import org.jboss.tools.jsf.web.helpers.context.ImportProjectWizardContext;
+import org.jboss.tools.jst.web.context.*;
+import org.jboss.tools.test.util.JUnitUtils;
+import org.osgi.framework.Bundle;
+
+import junit.framework.TestCase;
+
+public class JSFImportTest extends TestCase {
+ File temp = null;
+ File projectLocation = null;
+
+ public void setUp() throws Exception {
+ init("org.jboss.tools.jsf.test", "/projects", "JSFKickStart1");
+ }
+
+ public void testImportWithoutLinks() {
+ if(projectLocation == null) return;
+ ImportWebDirProjectContext context = new ImportProjectWizardContext(XModelFactory.getDefaultInstance().getRoot());
+
+ File webxml = new File(projectLocation, "WebContent/WEB-INF/web.xml");
+ context.setWebXmlLocation(webxml.getAbsolutePath());
+ context.setProjectName(projectLocation.getName());
+ context.setApplicationName(projectLocation.getName());
+ context.setLinkingToProjectOutsideWorkspace(false);
+
+
+ JSFProjectAdoptOperation operation = new JSFProjectAdoptOperation(context);
+ try {
+ operation.run(new NullProgressMonitor());
+ } catch (Exception ex) {
+ JUnitUtils.fail("Error in import operation", ex);
+ }
+
+ IProject p = ResourcesPlugin.getWorkspace().getRoot().getProject("JSFKickStart1");
+ assertTrue("Project was not loaded", p != null);
+
+ File f = new File(p.getLocation().toFile(), ".project");
+ assertTrue("File .project is not found at project location", f.exists());
+
+ assertTrue("Eclipse project is not located at imported project location",
+ p.getLocation().toFile().equals(projectLocation));
+
+ try {
+ p.delete(false, true, new NullProgressMonitor());
+ } catch (CoreException e) {
+ JUnitUtils.fail("Error in removing project", e);
+ }
+
+ }
+
+ private void init(String bundleName, String projectPath, String name) throws Exception {
+ Bundle bundle = Platform.getBundle(bundleName);
+ URL url = null;
+ try {
+ url = FileLocator.resolve(bundle.getEntry(projectPath));
+ } catch (Exception e) {
+ throw new Exception("Cannot find project " + name + " in " + bundleName);
+ }
+ String location = url.getFile();
+ File original = new File(location, name);
+ temp = new File(original.getParent(), "ws");
+ temp.mkdirs();
+ projectLocation = new File(temp, original.getName());
+ projectLocation.mkdirs();
+ FileFilter filter = new FileFilter() {
+ public boolean accept(File pathname) {
+ String n = pathname.getName();
+ if(n.startsWith(".")) return false;
+ return true;
+ }
+ };
+ FileUtil.copyDir(original, projectLocation, true, true, true, filter);
+ }
+
+ protected void tearDown() throws Exception {
+ clean();
+ }
+
+ private void clean() {
+ if(temp != null && temp.isDirectory()) {
+ FileUtil.clear(temp);
+ temp.delete();
+ temp = null;
+ }
+ }
+
+}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2007-12-19 16:09:34 UTC (rev 5375)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/JsfAllTests.java 2007-12-19 16:10:57 UTC (rev 5376)
@@ -21,6 +21,7 @@
suite.addTestSuite(JSFModelTest.class);
suite.addTestSuite(ModelFormat_2_0_0_Test.class);
+ suite.addTestSuite(JSFImportTest.class);
return suite;
}
17 years
JBoss Tools SVN: r5375 - in trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui: wizards/project and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-12-19 11:09:34 -0500 (Wed, 19 Dec 2007)
New Revision: 5375
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java
Log:
JBIDE-1223
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java 2007-12-19 16:09:04 UTC (rev 5374)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/operation/WebProjectAdoptOperation.java 2007-12-19 16:09:34 UTC (rev 5375)
@@ -31,7 +31,6 @@
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.model.util.XMLUtil;
import org.jboss.tools.common.util.FileUtil;
-import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.jst.web.context.*;
import org.jboss.tools.jst.web.ui.WebUiPlugin;
@@ -52,11 +51,11 @@
setProperty(WebNatureOperation.WEB_CONTENT_LOCATION_ID, context.getWebRootPath().replace('\\', '/'));
setProperty(WebNatureOperation.WEB_XML_LOCATION_ID, context.getWebXmlLocation().replace('\\', '/'));
setProperty(WebNatureOperation.RUNTIME_NAME, context.getRegisterServerContext().getRuntimeName());
- this.context = (ImportWebProjectContext)context;
+ this.context = context;
}
protected boolean isLinkingToProjectOutsideWorkspace() {
- return true; //TODO modify
+ return context.isLinkingToProjectOutsideWorkspace();
}
protected boolean hasJavaSource() {
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java 2007-12-19 16:09:04 UTC (rev 5374)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/wizards/project/ImportWebProjectWizardPage.java 2007-12-19 16:09:34 UTC (rev 5375)
@@ -54,8 +54,10 @@
private XAttributeSupport support;
private IModelPropertyEditorAdapter projectNameAdapter;
private IModelPropertyEditorAdapter webXmlLocationAdapter;
+ private IModelPropertyEditorAdapter linkAdapter;
private PropertyChangeListener updateDataListener;
private IPropertyEditor projectNameEditor;
+ private IPropertyEditor linkEditor;
// private static final int DIALOG_WIDTH = 540;
// private static final int DIALOG_HEIGHT = 600;
@@ -65,13 +67,21 @@
super("Wizard Page"); //$NON-NLS-1$
this.context = context;
- XEntityData entityData = XEntityDataImpl.create(
+ XEntityData entityData =
+ (context.isInitialized())
+ ? XEntityDataImpl.create(
new String[][] {
{ImportWebDirProjectContext.PAGE_NAME, ""}, //$NON-NLS-1$
+ {ImportWebDirProjectContext.ATTR_NAME, "yes"}, //$NON-NLS-1$
{ImportWebDirProjectContext.ATTR_LOCATON, "yes"}, //$NON-NLS-1$
- {ImportWebDirProjectContext.ATTR_NAME, "yes"} //$NON-NLS-1$
- }
- );
+ })
+ : XEntityDataImpl.create(
+ new String[][] {
+ {ImportWebDirProjectContext.PAGE_NAME, ""}, //$NON-NLS-1$
+ {ImportWebDirProjectContext.ATTR_NAME, "yes"}, //$NON-NLS-1$
+ {ImportWebDirProjectContext.ATTR_LOCATON, "yes"}, //$NON-NLS-1$
+ {ImportWebDirProjectContext.ATTR_LINK, "no"} //$NON-NLS-1$
+ });
support = new XAttributeSupport(ModelUtilities.getPreferenceModel().getRoot(), entityData);
support.setLayout(getLayoutForSupport());
@@ -79,13 +89,14 @@
projectNameAdapter.setValue(""); //$NON-NLS-1$
webXmlLocationAdapter = support.getPropertyEditorAdapterByName(ImportWebDirProjectContext.ATTR_LOCATON);
webXmlLocationAdapter.setValue(""); //$NON-NLS-1$
-// IPropertyEditor editor = support.getPropertyEditorByName(ImportWebDirProjectContext.ATTR_LOCATON);
- //editor.setLabelText("Location*");
if(context.isInitialized()) {
projectNameAdapter.setValue("" + context.getProjectName()); //$NON-NLS-1$
if(getWebXmlFile(context.getInitialLocation()) != null)
webXmlLocationAdapter.setValue("" + context.getInitialLocation()); //$NON-NLS-1$
- }
+ } else {
+ linkAdapter = support.getPropertyEditorAdapterByName(ImportWebDirProjectContext.ATTR_LINK);
+ linkAdapter.setValue("true");
+ }
}
public void dispose() {
@@ -97,6 +108,8 @@
if (webXmlLocationAdapter!=null) webXmlLocationAdapter.dispose();
webXmlLocationAdapter = null;
if (projectNameEditor!=null) projectNameEditor.dispose();
+ if(linkAdapter != null) linkAdapter.dispose();
+ linkAdapter = null;
projectNameEditor = null;
updateDataListener = null;
}
@@ -112,6 +125,9 @@
setControl(control);
projectNameEditor = (IPropertyEditor)support.getPropertyEditorByName(ImportWebDirProjectContext.ATTR_NAME);
projectNameEditor.getFieldEditor((Composite)getControl()).setEnabled(false, (Composite)getControl());
+ if(linkAdapter != null) {
+ linkEditor = (IPropertyEditor)support.getPropertyEditorByName(ImportWebDirProjectContext.ATTR_LINK);
+ }
initListeners();
setErrorMessage(null);
setMessage(null);
@@ -160,6 +176,9 @@
updateContext(true, false);
setPageComplete(validatePage());
getContainer().updateButtons();
+ if(linkAdapter != null) {
+ support.getFieldEditorByName(ImportWebDirProjectContext.ATTR_LINK).setEnabled(mayNeedLink(), (Composite)getControl());
+ }
}
};
projectNameAdapter.addValueChangeListener(updateDataListener);
@@ -169,9 +188,20 @@
updateContext(false, true);
setPageComplete(validatePage());
getContainer().updateButtons();
+ if(linkAdapter != null) {
+ support.getFieldEditorByName(ImportWebDirProjectContext.ATTR_LINK).setEnabled(mayNeedLink(), (Composite)getControl());
+ }
}
}
);
+ if(linkAdapter != null) linkAdapter.addValueChangeListener(
+ new PropertyChangeListener() {
+ public void propertyChange(PropertyChangeEvent evt) {
+ String v = linkAdapter.getStringValue(false);
+ context.setLinkingToProjectOutsideWorkspace(!"false".equals(v));
+ }
+ }
+ );
}
private String getProjectNameValue() {
@@ -187,6 +217,16 @@
projectNameAdapter.setValue(value);
projectNameAdapter.addValueChangeListener(updateDataListener);
}
+
+ private boolean mayNeedLink() {
+ String location = getWebXmlLocationValue();
+ if(location == null || location.trim().length() == 0) return false;
+ String workspace = ResourcesPlugin.getWorkspace().getRoot().getLocation().toString().replace('\\', '/') + '/';
+ location = location.replace('\\', '/');
+ if(!location.startsWith(workspace)) return true;
+
+ return false;
+ }
private void updateProjectNameValue(boolean onProjectNameEdit, boolean onProjectLocationEdit) {
if(context.isInitialized()) return;
17 years