JBoss Tools SVN: r36429 - in trunk/seam/plugins/org.jboss.tools.seam.ui: src/org/jboss/tools/seam/ui/views and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-17 19:49:06 -0500 (Thu, 17 Nov 2011)
New Revision: 36429
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/AbstractSeamContentProvider.java
Log:
JBIDE-10195
https://issues.jboss.org/browse/JBIDE-10195
Seam 2 Components view should show Seam 2 project when it is opened in new window.
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2011-11-18 00:47:16 UTC (rev 36428)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2011-11-18 00:49:06 UTC (rev 36429)
@@ -204,12 +204,14 @@
id="org.jboss.tools.seam.ui.views.rootContent">
<triggerPoints>
<or>
+ <instanceof value="org.eclipse.core.resources.IProject" />
<instanceof value="org.eclipse.core.resources.IWorkspaceRoot" />
<instanceof value="org.jboss.tools.seam.core.ISeamElement" />
</or>
</triggerPoints>
<possibleChildren>
<or>
+ <instanceof value="org.eclipse.core.resources.IProject" />
<instanceof value="org.eclipse.core.resources.IWorkspaceRoot" />
<instanceof value="org.jboss.tools.seam.core.ISeamElement" />
</or>
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/AbstractSeamContentProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/AbstractSeamContentProvider.java 2011-11-18 00:47:16 UTC (rev 36428)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/AbstractSeamContentProvider.java 2011-11-18 00:49:06 UTC (rev 36429)
@@ -115,6 +115,15 @@
}
public Object[] getElements(Object inputElement) {
+ if(inputElement instanceof IProject) {
+ ISeamProject p = SeamCorePlugin.getSeamProject((IProject)inputElement, false);
+ if (p == null) return new Object[0];
+ if(!processed.contains(p)) {
+ processed.add(p);
+ p.addSeamProjectListener(this);
+ }
+ return new Object[]{p};
+ }
return getChildren(inputElement);
}
13 years, 1 month
JBoss Tools SVN: r36428 - trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-17 19:47:16 -0500 (Thu, 17 Nov 2011)
New Revision: 36428
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamPerspectiveFactory.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIUtil.java
Log:
Constants are substituted for strings.
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamPerspectiveFactory.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamPerspectiveFactory.java 2011-11-17 23:26:09 UTC (rev 36427)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamPerspectiveFactory.java 2011-11-18 00:47:16 UTC (rev 36428)
@@ -9,7 +9,7 @@
public class SeamPerspectiveFactory implements IPerspectiveFactory {
- private static final String SEAM_COMPONENTS_NAVIGATOR = "org.jboss.tools.seam.ui.views.SeamComponentsNavigator"; //$NON-NLS-1$
+ private static final String SEAM_COMPONENTS_NAVIGATOR = ISeamUiConstants.SEAM_COMPONENTS_VIEW_ID;
private static String JBOSS_SERVERS_VIEW = "org.jboss.ide.eclipse.as.ui.views.JBossServerView"; //$NON-NLS-1$
private static String WTP_SERVERS_VIEW = "org.eclipse.wst.server.ui.ServersView"; //$NON-NLS-1$
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIUtil.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIUtil.java 2011-11-17 23:26:09 UTC (rev 36427)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUIUtil.java 2011-11-18 00:47:16 UTC (rev 36428)
@@ -22,7 +22,7 @@
public class SeamUIUtil {
public static void refreshSeamComponentView(){
- CommonNavigator navigator = (CommonNavigator)Workbench.getInstance().getActiveWorkbenchWindow().getActivePage().findView("org.jboss.tools.seam.ui.views.SeamComponentsNavigator");
+ CommonNavigator navigator = (CommonNavigator)Workbench.getInstance().getActiveWorkbenchWindow().getActivePage().findView(ISeamUiConstants.SEAM_COMPONENTS_VIEW_ID);
if(navigator != null)
navigator.getCommonViewer().refresh();
}
13 years, 1 month
JBoss Tools SVN: r36427 - trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-11-17 18:26:09 -0500 (Thu, 17 Nov 2011)
New Revision: 36427
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityMarkerResolution.java
Log:
"Configure Problem Severity" quick fix for every JBDS Problem Markers which opens Preferences Dialog filtered with current problem https://issues.jboss.org/browse/JBIDE-9885
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityMarkerResolution.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityMarkerResolution.java 2011-11-17 23:14:03 UTC (rev 36426)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/marker/ConfigureProblemSeverityMarkerResolution.java 2011-11-17 23:26:09 UTC (rev 36427)
@@ -16,6 +16,7 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.internal.ui.DebugUIPlugin;
+import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IMarkerResolution2;
import org.eclipse.ui.dialogs.PreferencesUtil;
@@ -59,7 +60,7 @@
}
public Image getImage() {
- return null;
+ return JavaPluginImages.DESC_ELCL_CONFIGURE_PROBLEM_SEVERITIES.createImage();
}
}
13 years, 1 month
JBoss Tools SVN: r36426 - trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/perspective.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-17 18:14:03 -0500 (Thu, 17 Nov 2011)
New Revision: 36426
Modified:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/perspective/CDIPerspectiveTest.java
Log:
JBIDE-10193
https://issues.jboss.org/browse/JBIDE-10193
Perspective test should not open new window.
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/perspective/CDIPerspectiveTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/perspective/CDIPerspectiveTest.java 2011-11-17 22:38:39 UTC (rev 36425)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/perspective/CDIPerspectiveTest.java 2011-11-17 23:14:03 UTC (rev 36426)
@@ -15,10 +15,12 @@
import junit.framework.TestCase;
+import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.WorkbenchException;
import org.jboss.tools.common.ui.JBossPerspectiveFactory;
-import org.jboss.tools.test.util.WorkbenchUtils;
/**
* @author Alexey Kazakov
@@ -30,7 +32,9 @@
* @throws WorkbenchException
*/
public void testJEEPerspective() throws WorkbenchException {
- IWorkbenchPage page = WorkbenchUtils.getWorkbench().getActiveWorkbenchWindow().openPage("org.eclipse.jst.j2ee.J2EEPerspective", null);
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+ IWorkbenchPage page = workbench.showPerspective("org.eclipse.jst.j2ee.J2EEPerspective", window);
assertNotNull(page);
assertShortcuts(page);
}
@@ -41,7 +45,9 @@
* @throws WorkbenchException
*/
public void testJBossPerspective() throws WorkbenchException {
- IWorkbenchPage page = WorkbenchUtils.getWorkbench().getActiveWorkbenchWindow().openPage(JBossPerspectiveFactory.PERSPECTIVE_ID, null);
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+ IWorkbenchPage page = workbench.showPerspective(JBossPerspectiveFactory.PERSPECTIVE_ID, window);
assertNotNull(page);
assertShortcuts(page);
}
13 years, 1 month
JBoss Tools SVN: r36425 - trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-17 17:38:39 -0500 (Thu, 17 Nov 2011)
New Revision: 36425
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JBossPerspectiveTest.java
Log:
JBIDE-10193
https://issues.jboss.org/browse/JBIDE-10193
Perspective test should not open new window.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JBossPerspectiveTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JBossPerspectiveTest.java 2011-11-17 22:35:42 UTC (rev 36424)
+++ trunk/jsf/tests/org.jboss.tools.jsf.ui.test/src/org/jboss/tools/jsf/ui/test/JBossPerspectiveTest.java 2011-11-17 22:38:39 UTC (rev 36425)
@@ -17,7 +17,10 @@
import org.eclipse.gef.ui.views.palette.PaletteView;
import org.eclipse.ui.IViewReference;
+import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.WorkbenchException;
import org.jboss.tools.common.ui.JBossPerspectiveFactory;
import org.jboss.tools.test.util.WorkbenchUtils;
@@ -33,7 +36,9 @@
* @throws WorkbenchException
*/
public void testJBossPerspective() throws WorkbenchException {
- IWorkbenchPage page = WorkbenchUtils.getWorkbench().getActiveWorkbenchWindow().openPage(JBossPerspectiveFactory.PERSPECTIVE_ID, null);
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+ IWorkbenchPage page = workbench.showPerspective(JBossPerspectiveFactory.PERSPECTIVE_ID, window);
assertNotNull(page);
IViewReference[] viewReferences = page.getViewReferences();
Set<String> viewIds = new HashSet<String>();
13 years, 1 month
JBoss Tools SVN: r36424 - trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-17 17:35:42 -0500 (Thu, 17 Nov 2011)
New Revision: 36424
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/JBossPerspectiveTest.java
Log:
JBIDE-10193
https://issues.jboss.org/browse/JBIDE-10193
Perspective test should not open new window.
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/JBossPerspectiveTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/JBossPerspectiveTest.java 2011-11-17 21:46:03 UTC (rev 36423)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/JBossPerspectiveTest.java 2011-11-17 22:35:42 UTC (rev 36424)
@@ -15,10 +15,12 @@
import junit.framework.TestCase;
+import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.WorkbenchException;
import org.jboss.tools.common.ui.JBossPerspectiveFactory;
-import org.jboss.tools.test.util.WorkbenchUtils;
/**
* @author Alexey Kazakov
@@ -31,7 +33,9 @@
* @throws WorkbenchException
*/
public void testJBossPerspective() throws WorkbenchException {
- IWorkbenchPage page = WorkbenchUtils.getWorkbench().getActiveWorkbenchWindow().openPage(JBossPerspectiveFactory.PERSPECTIVE_ID, null);
+ IWorkbench workbench = PlatformUI.getWorkbench();
+ IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
+ IWorkbenchPage page = workbench.showPerspective(JBossPerspectiveFactory.PERSPECTIVE_ID, window);
assertNotNull(page);
String[] shortcuts = page.getNewWizardShortcuts();
Set<String> shortcutSet = new HashSet<String>();
13 years, 1 month
JBoss Tools SVN: r36423 - in trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator: ui and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-11-17 16:46:03 -0500 (Thu, 17 Nov 2011)
New Revision: 36423
Modified:
trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java
trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ui/ESBConfigurationBlock.java
trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ui/ESBValidatorPreferencePage.java
Log:
"Configure Problem Severity" quick fix for every JBDS Problem Markers which opens Preferences Dialog filtered with current problem https://issues.jboss.org/browse/JBIDE-9885
Modified: trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java 2011-11-17 21:36:29 UTC (rev 36422)
+++ trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBCoreValidator.java 2011-11-17 21:46:03 UTC (rev 36423)
@@ -47,6 +47,7 @@
public class ESBCoreValidator extends ESBValidationErrorManager implements IValidator {
public static final String ID = "org.jboss.tools.esb.validator.ESBCoreValidator"; //$NON-NLS-1$
public static final String PROBLEM_TYPE = "org.jboss.tools.esb.validator.esbproblem"; //$NON-NLS-1$
+ public static final String PREFERENCE_PAGE_ID = "org.jboss.tools.esb.validator.ui.ESBValidatorPreferencePage"; //$NON-NLS-1$
static String XML_EXT = ".xml"; //$NON-NLS-1$
static String ATTR_PATH = "path"; //$NON-NLS-1$
@@ -370,6 +371,11 @@
}
}
}
+
+ @Override
+ protected String getPreferencePageId() {
+ return PREFERENCE_PAGE_ID;
+ }
}
class XMLValueInfo implements IValueInfo {
Modified: trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ui/ESBConfigurationBlock.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ui/ESBConfigurationBlock.java 2011-11-17 21:36:29 UTC (rev 36422)
+++ trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ui/ESBConfigurationBlock.java 2011-11-17 21:46:03 UTC (rev 36423)
@@ -85,4 +85,9 @@
protected IDialogSettings getDialogSettings() {
return ESBValidatorPlugin.getDefault().getDialogSettings().getSection(SETTINGS_SECTION_NAME);
}
+
+ @Override
+ protected String getQualifier() {
+ return ESBValidatorPlugin.PLUGIN_ID;
+ }
}
\ No newline at end of file
Modified: trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ui/ESBValidatorPreferencePage.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ui/ESBValidatorPreferencePage.java 2011-11-17 21:36:29 UTC (rev 36422)
+++ trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ui/ESBValidatorPreferencePage.java 2011-11-17 21:46:03 UTC (rev 36423)
@@ -13,6 +13,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
import org.jboss.tools.common.ui.preferences.SeverityPreferencePage;
+import org.jboss.tools.esb.validator.ESBCoreValidator;
import org.jboss.tools.esb.validator.ESBValidatorPlugin;
/**
@@ -20,7 +21,7 @@
*/
public class ESBValidatorPreferencePage extends SeverityPreferencePage {
- public static final String PREF_ID = "org.jboss.tools.esb.validator.ui.ESBValidatorPreferencePage"; //$NON-NLS-1$
+ public static final String PREF_ID = ESBCoreValidator.PREFERENCE_PAGE_ID;
public static final String PROP_ID = "org.jboss.tools.esb.validator.ui.propertyPages.ESBValidatorPreferencePage"; //$NON-NLS-1$
public ESBValidatorPreferencePage() {
13 years, 1 month
JBoss Tools SVN: r36422 - in trunk: cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences and 7 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2011-11-17 16:36:29 -0500 (Thu, 17 Nov 2011)
New Revision: 36422
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIValidatorPreferencePage.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidationPreferencePage.java
trunk/jsf/plugins/org.jboss.tools.jsf/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/composite/CompositeComponentValidator.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidator.java
trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELValidatorPreferencePage.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationErrorManager.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorPreferencePage.java
Log:
"Configure Problem Severity" quick fix for every JBDS Problem Markers which opens Preferences Dialog filtered with current problem https://issues.jboss.org/browse/JBIDE-9885
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2011-11-17 21:21:37 UTC (rev 36421)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2011-11-17 21:36:29 UTC (rev 36422)
@@ -109,6 +109,7 @@
public class CDICoreValidator extends CDIValidationErrorManager {
public static final String ID = "org.jboss.tools.cdi.core.CoreValidator"; //$NON-NLS-1$
public static final String PROBLEM_TYPE = "org.jboss.tools.cdi.core.cdiproblem"; //$NON-NLS-1$
+ public static final String PREFERENCE_PAGE_ID = "org.jboss.tools.cdi.ui.preferences.CDIValidatorPreferencePage"; //$NON-NLS-1$
ICDIProject rootCdiProject;
Map<IProject, CDIValidationContext> cdiContexts = new HashMap<IProject, CDIValidationContext>();
@@ -2520,7 +2521,7 @@
@Override
protected String getPreferencePageId() {
- return "org.jboss.tools.cdi.ui.preferences.CDIValidatorPreferencePage";
+ return PREFERENCE_PAGE_ID;
}
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIValidatorPreferencePage.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIValidatorPreferencePage.java 2011-11-17 21:21:37 UTC (rev 36421)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIValidatorPreferencePage.java 2011-11-17 21:36:29 UTC (rev 36422)
@@ -13,6 +13,7 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
import org.jboss.tools.cdi.core.CDICorePlugin;
+import org.jboss.tools.cdi.internal.core.validation.CDICoreValidator;
import org.jboss.tools.common.ui.preferences.SeverityPreferencePage;
/**
@@ -20,7 +21,7 @@
*/
public class CDIValidatorPreferencePage extends SeverityPreferencePage {
- public static final String PREF_ID = "org.jboss.tools.cdi.ui.preferences.CDIValidatorPreferencePage"; //$NON-NLS-1$
+ public static final String PREF_ID = CDICoreValidator.PREFERENCE_PAGE_ID;
public static final String PROP_ID = "org.jboss.tools.cdi.ui.propertyPages.CDIValidatorPreferencePage"; //$NON-NLS-1$
public CDIValidatorPreferencePage() {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/META-INF/MANIFEST.MF 2011-11-17 21:21:37 UTC (rev 36421)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/META-INF/MANIFEST.MF 2011-11-17 21:36:29 UTC (rev 36422)
@@ -39,6 +39,7 @@
org.jboss.tools.jsf.web.helpers.context,
org.jboss.tools.jsf.web.pattern,
org.jboss.tools.jsf.web.validation,
+ org.jboss.tools.jsf.web.validation.composite,
org.jboss.tools.jsf.web.validation.i18n,
org.jboss.tools.jsf.web.validation.jsf2,
org.jboss.tools.jsf.web.validation.jsf2.action,
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/composite/CompositeComponentValidator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/composite/CompositeComponentValidator.java 2011-11-17 21:21:37 UTC (rev 36421)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/composite/CompositeComponentValidator.java 2011-11-17 21:36:29 UTC (rev 36422)
@@ -66,6 +66,7 @@
public static final String ID = "org.jboss.tools.jsf.CompositeComponentValidator"; //$NON-NLS-1$
public static final String PROBLEM_TYPE = "org.jboss.tools.jsf.compositeproblem"; //$NON-NLS-1$
public static final String SHORT_ID = "jboss.jsf.core"; //$NON-NLS-1$
+ public static final String PREFERENCE_PAGE_ID = "org.jboss.tools.jsf.ui.preferences.JSFValidationPreferencePage"; //$NON-NLS-1$
private static final String COMPOSITE_COMPONENT_URI_PREFIX = "http://java.sun.com/jsf/composite/"; //$NON-NLS-1$
@@ -380,6 +381,6 @@
@Override
protected String getPreferencePageId() {
- return "org.jboss.tools.jsf.ui.preferences.JSFValidationPreferencePage";
+ return PREFERENCE_PAGE_ID;
}
}
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidationPreferencePage.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidationPreferencePage.java 2011-11-17 21:21:37 UTC (rev 36421)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidationPreferencePage.java 2011-11-17 21:36:29 UTC (rev 36422)
@@ -14,13 +14,14 @@
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
import org.jboss.tools.common.ui.preferences.SeverityPreferencePage;
import org.jboss.tools.jsf.JSFModelPlugin;
+import org.jboss.tools.jsf.web.validation.composite.CompositeComponentValidator;
/**
* @author Alexey Kazakov
*/
public class JSFValidationPreferencePage extends SeverityPreferencePage {
- public static final String PREF_ID = "org.jboss.tools.jsf.ui.preferences.JSFValidationPreferencePage"; //$NON-NLS-1$
+ public static final String PREF_ID = CompositeComponentValidator.PREFERENCE_PAGE_ID;
public static final String PROP_ID = "org.jboss.tools.jsf.ui.propertyPages.JSFValidationPreferencePage"; //$NON-NLS-1$
public JSFValidationPreferencePage() {
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidator.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidator.java 2011-11-17 21:21:37 UTC (rev 36421)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ELValidator.java 2011-11-17 21:36:29 UTC (rev 36422)
@@ -69,6 +69,7 @@
public static final String ID = "org.jboss.tools.jst.web.kb.ELValidator"; //$NON-NLS-1$
public static final String PROBLEM_TYPE = "org.jboss.tools.jst.web.kb.elproblem"; //$NON-NLS-1$
+ public static final String PREFERENCE_PAGE_ID = "org.jboss.tools.jst.web.ui.preferences.ELValidatorPreferencePage"; //$NON-NLS-1$
private static final String EXTENSION_POINT_ID = "org.jboss.tools.jst.web.kb.elValidationDelegate"; //$NON-NLS-1$
@@ -493,6 +494,6 @@
@Override
protected String getPreferencePageId() {
- return "org.jboss.tools.jst.web.kb.preferences.KBValidationPreferencePage";
+ return PREFERENCE_PAGE_ID;
}
}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELValidatorPreferencePage.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELValidatorPreferencePage.java 2011-11-17 21:21:37 UTC (rev 36421)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/src/org/jboss/tools/jst/web/ui/internal/preferences/ELValidatorPreferencePage.java 2011-11-17 21:36:29 UTC (rev 36422)
@@ -14,12 +14,13 @@
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
import org.jboss.tools.common.ui.preferences.SeverityPreferencePage;
import org.jboss.tools.jst.web.kb.WebKbPlugin;
+import org.jboss.tools.jst.web.kb.internal.validation.ELValidator;
/**
* @author Viacheslav Kabanovich
*/
public class ELValidatorPreferencePage extends SeverityPreferencePage {
- public static final String PREF_ID = "org.jboss.tools.jst.web.ui.preferences.ELValidatorPreferencePage"; //$NON-NLS-1$
+ public static final String PREF_ID = ELValidator.PREFERENCE_PAGE_ID;
public static final String PROP_ID = "org.jboss.tools.jst.web.ui.properties.ELValidatorPreferencePage"; //$NON-NLS-1$
public ELValidatorPreferencePage() {
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationErrorManager.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationErrorManager.java 2011-11-17 21:21:37 UTC (rev 36421)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationErrorManager.java 2011-11-17 21:36:29 UTC (rev 36422)
@@ -20,6 +20,7 @@
abstract public class SeamValidationErrorManager extends ValidationErrorManager {
public static final String MARKED_SEAM_PROJECT_MESSAGE_GROUP = "markedSeamProject"; //$NON-NLS-1$
+ public static final String PREFERENCE_PAGE_ID = "org.jboss.tools.seam.ui.preferences.SeamValidatorPreferencePage"; //$NON-NLS-1$
/* (non-Javadoc)
* @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getPreference(org.eclipse.core.resources.IProject, java.lang.String)
@@ -40,6 +41,6 @@
@Override
protected String getPreferencePageId() {
- return "org.jboss.tools.seam.ui.preferences.SeamValidatorPreferencePage";
+ return PREFERENCE_PAGE_ID;
}
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorPreferencePage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorPreferencePage.java 2011-11-17 21:21:37 UTC (rev 36421)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorPreferencePage.java 2011-11-17 21:36:29 UTC (rev 36422)
@@ -15,12 +15,13 @@
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
import org.jboss.tools.common.ui.preferences.SeverityPreferencePage;
import org.jboss.tools.seam.core.SeamCorePlugin;
+import org.jboss.tools.seam.internal.core.validation.SeamValidationErrorManager;
/**
* @author Viacheslav Kabanovich
*/
public class SeamValidatorPreferencePage extends SeverityPreferencePage {
- public static final String PREF_ID = "org.jboss.tools.seam.ui.preferences.SeamValidatorPreferencePage"; //$NON-NLS-1$
+ public static final String PREF_ID = SeamValidationErrorManager.PREFERENCE_PAGE_ID;
public static final String PROP_ID = "org.jboss.tools.seam.ui.propertyPages.SeamValidatorPreferencePage"; //$NON-NLS-1$
public SeamValidatorPreferencePage() {
13 years, 1 month
JBoss Tools SVN: r36421 - trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-17 16:21:37 -0500 (Thu, 17 Nov 2011)
New Revision: 36421
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/WebUtils.java
Log:
JBIDE-10177
https://issues.jboss.org/browse/JBIDE-10177
WebUtils moved to common
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/WebUtils.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/WebUtils.java 2011-11-17 21:19:41 UTC (rev 36420)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/WebUtils.java 2011-11-17 21:21:37 UTC (rev 36421)
@@ -12,8 +12,6 @@
import java.io.File;
import java.io.IOException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
@@ -22,25 +20,18 @@
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.JavaCore;
-import org.eclipse.jst.j2ee.componentcore.J2EEModuleVirtualComponent;
import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
-import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
import org.eclipse.wst.common.componentcore.ComponentCore;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
-import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.jboss.tools.common.model.project.IModelNature;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.jst.web.project.WebProject;
@@ -88,82 +79,10 @@
return (modelNature != null) ? WebProject.getInstance(modelNature.getModel()).getWebRootLocation() : null;
}
- private static final IContainer[] EMPTY_ARRAY = new IContainer[0];
-
- /**
- * Returns all the web root folders of the project.
- * If the project is not a web project then the method will return an empty array.
- * If ignoreDerived==true then all the derived resources or resources belonged to derived containers will be eliminated.
- * If some folder is set as default web root source folder (available since WTP 3.3.1) then this folder will be places in the very beginning of the result array.
- * @param project
- * @param ignoreDerived
- * @return
- */
public static IContainer[] getWebRootFolders(IProject project, boolean ignoreDerived) {
- IFacetedProject facetedProject = null;
- try {
- facetedProject = ProjectFacetsManager.create(project);
- } catch (CoreException e) {
- WebModelPlugin.getDefault().logError(e);
- }
- if(facetedProject!=null && facetedProject.getProjectFacetVersion(IJ2EEFacetConstants.DYNAMIC_WEB_FACET)!=null) {
- IVirtualComponent component = ComponentCore.createComponent(project);
- if(component!=null) {
- IVirtualFolder webRootVirtFolder = component.getRootFolder().getFolder(new Path("/")); //$NON-NLS-1$
-
- IPath defaultPath = getDefaultDeploymentDescriptorFolder(webRootVirtFolder);
-
- IContainer[] folders = webRootVirtFolder.getUnderlyingFolders();
- if(folders.length > 1){
- ArrayList<IContainer> containers = new ArrayList<IContainer>();
- for(IContainer container : folders){
- if(!ignoreDerived || !container.isDerived(IResource.CHECK_ANCESTORS)) {
- if(defaultPath!=null && defaultPath.equals(container.getFullPath())) {
- containers.add(0, container); // Put default root folder to the first position of the list
- } else {
- containers.add(container);
- }
- }
- }
- return containers.toArray(new IContainer[containers.size()]);
- } else {
- return folders;
- }
- }
- }
- return EMPTY_ARRAY;
+ return org.jboss.tools.common.web.WebUtils.getWebRootFolders(project, ignoreDerived);
}
- private static boolean WTP_3_3_0 = false;
-
- /**
- * Returns all the web root folders of the project.
- * If the project is not a web project then the method will return an empty array.
- * All the derived resources or resources belonged to derived containers will be eliminated.
- * If some folder is set as default web root source folder (available since WTP 3.3.1) then this folder will be places in the very beginning of the result array.
- * @param project
- * @return
- */
- public static IPath getDefaultDeploymentDescriptorFolder(IVirtualFolder folder) {
- if(!WTP_3_3_0) {
- try {
- Method getDefaultDeploymentDescriptorFolder = J2EEModuleVirtualComponent.class.getMethod("getDefaultDeploymentDescriptorFolder", IVirtualFolder.class); //$NON-NLS-1$
- return (IPath) getDefaultDeploymentDescriptorFolder.invoke(null, folder);
- } catch (NoSuchMethodException nsme) {
- // Not available in this WTP version, let's ignore it
- WTP_3_3_0 = true;
- } catch (IllegalArgumentException e) {
- WebModelPlugin.getDefault().logError(e);
- } catch (IllegalAccessException e) {
- WebModelPlugin.getDefault().logError(e);
- } catch (InvocationTargetException e) {
- // Not available in this WTP version, let's ignore it
- WTP_3_3_0 = true;
- }
- }
- return null;
- }
-
public static IContainer[] getWebRootFolders(IProject project) {
return getWebRootFolders(project, true);
}
13 years, 1 month
JBoss Tools SVN: r36420 - trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/helpers.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-11-17 16:19:41 -0500 (Thu, 17 Nov 2011)
New Revision: 36420
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/helpers/InnerModelHelper.java
Log:
JBIDE-10177
https://issues.jboss.org/browse/JBIDE-10177
WebUtils moved to common
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/helpers/InnerModelHelper.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/helpers/InnerModelHelper.java 2011-11-17 21:13:32 UTC (rev 36419)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/model/helpers/InnerModelHelper.java 2011-11-17 21:19:41 UTC (rev 36420)
@@ -13,6 +13,7 @@
import java.io.IOException;
+import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
@@ -26,9 +27,9 @@
import org.jboss.tools.common.model.XModelConstants;
import org.jboss.tools.common.model.XModelObject;
import org.jboss.tools.common.model.project.IModelNature;
-import org.jboss.tools.common.model.project.ProjectHome;
import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.common.model.util.XModelObjectUtil;
+import org.jboss.tools.common.web.WebUtils;
public class InnerModelHelper {
@@ -74,7 +75,16 @@
}
//Taken from J2EEUtils and modified
- public static IPath getWebInfPath(IProject project) {
+ public static IPath getWebInfPath(IProject project) {
+ IContainer[] cs = WebUtils.getWebRootFolders(project, true);
+ for (IContainer c: cs) {
+ if(c.exists()) {
+ IFolder f = c.getFolder(new Path("WEB-INF")); //$NON-NLS-1$
+ if(f.exists()) {
+ return f.getFullPath();
+ }
+ }
+ }
IVirtualComponent component = ComponentCore.createComponent(project);
if(component == null) return null;
IVirtualFolder webInfDir = component.getRootFolder().getFolder(new Path("/WEB-INF")); //$NON-NLS-1$
@@ -82,11 +92,22 @@
return (!webInfDir.exists()) ? null : modulePath;
}
+ public static IPath getFirstWebContentPath(IProject project) {
+ IContainer[] cs = WebUtils.getWebRootFolders(project, true);
+ for (IContainer c: cs) {
+ if(c.exists()) {
+ return c.getFullPath();
+ }
+ }
+ return null;
+ }
+
+
static String getWebRootPath(IProject project, String webInfLocation) {
String webRootLocation = XModelConstants.WORKSPACE_REF + "/.."; //$NON-NLS-1$
- IPath wrp = ProjectHome.getFirstWebContentPath(project);
- IPath wip = ProjectHome.getWebInfPath(project);
+ IPath wrp = getFirstWebContentPath(project);
+ IPath wip = getWebInfPath(project);
if(wrp == null || wip == null) {
return webRootLocation;
13 years, 1 month