JBoss Tools SVN: r34195 - in trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui: editor/check and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-08-23 20:02:47 -0400 (Tue, 23 Aug 2011)
New Revision: 34195
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/AddJSFNatureActionDelegate.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/JSFNaturesInfoDialog.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/KBNaturesInfoDialog.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/ProjectNaturesChecker.java
Log:
JBIDE-9198
https://issues.jboss.org/browse/JBIDE-9198
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/AddJSFNatureActionDelegate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/AddJSFNatureActionDelegate.java 2011-08-23 23:08:06 UTC (rev 34194)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/AddJSFNatureActionDelegate.java 2011-08-24 00:02:47 UTC (rev 34195)
@@ -14,6 +14,7 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.jboss.tools.common.meta.key.WizardKeys;
import org.jboss.tools.common.model.ui.util.ExtensionPointUtils;
import org.eclipse.jface.action.IAction;
@@ -37,7 +38,14 @@
import org.jboss.tools.jsf.ui.wizard.project.ImportProjectWizard;
public class AddJSFNatureActionDelegate extends AddNatureActionDelegate {
+ boolean showDialog = true;
+ public AddJSFNatureActionDelegate() {}
+
+ public AddJSFNatureActionDelegate(boolean showDialog) {
+ this.showDialog = showDialog;
+ }
+
protected IWizard getWizard(IProject project) {
ImportProjectWizard wizard = (ImportProjectWizard)ExtensionPointUtils.findImportWizardsItem(
JSFModelPlugin.PLUGIN_ID,
@@ -97,8 +105,12 @@
wc.addProjectFacet(jsf);
}
- PreferenceDialog dialog = PreferencesUtil.createPropertyDialogOn(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), project, FacetsPropertyPage.ID, new String[] {FacetsPropertyPage.ID}, null);
- dialog.open();
+ if(!showDialog) {
+ wc.commitChanges(new NullProgressMonitor());
+ } else {
+ PreferenceDialog dialog = PreferencesUtil.createPropertyDialogOn(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), project, FacetsPropertyPage.ID, new String[] {FacetsPropertyPage.ID}, null);
+ dialog.open();
+ }
SharedWorkingCopyManager.releaseWorkingCopy(fp);
} catch (CoreException e) {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/JSFNaturesInfoDialog.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/JSFNaturesInfoDialog.java 2011-08-23 23:08:06 UTC (rev 34194)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/JSFNaturesInfoDialog.java 2011-08-24 00:02:47 UTC (rev 34195)
@@ -17,6 +17,7 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.common.model.options.Preference;
import org.jboss.tools.jsf.ui.JsfUIMessages;
import org.jboss.tools.jsf.ui.editor.check.wizards.AddJSFCapabilitiesWizard;
@@ -53,9 +54,8 @@
@Override
protected void skipButtonPressed() {
try {
- project.setPersistentProperty(
- ProjectNaturesChecker.IS_JSF_NATURES_CHECK_NEED,
- Boolean.toString(!isRemember));
+ String value = !isRemember ? "yes" : "no";
+ Preference.SHOW_NATURE_WARNING.setValue(value);
} catch (CoreException e) {
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/KBNaturesInfoDialog.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/KBNaturesInfoDialog.java 2011-08-23 23:08:06 UTC (rev 34194)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/KBNaturesInfoDialog.java 2011-08-24 00:02:47 UTC (rev 34195)
@@ -30,6 +30,7 @@
import org.eclipse.ui.ide.IDE;
import org.eclipse.ui.internal.views.markers.MarkerSupportInternalUtilities;
import org.eclipse.ui.views.markers.internal.MarkerMessages;
+import org.jboss.tools.common.model.options.Preference;
import org.jboss.tools.jsf.ui.JsfUIMessages;
import org.jboss.tools.jsf.ui.JsfUiPlugin;
import org.jboss.tools.jsf.ui.editor.check.wizards.QuickFixWizard;
@@ -118,9 +119,8 @@
@Override
protected void skipButtonPressed() {
try {
- project.setPersistentProperty(
- ProjectNaturesChecker.IS_KB_NATURES_CHECK_NEED,
- Boolean.toString(!isRemember));
+ String value = !isRemember ? "yes" : "no";
+ Preference.SHOW_NATURE_WARNING.setValue(value);
} catch (CoreException e) {
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/ProjectNaturesChecker.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/ProjectNaturesChecker.java 2011-08-23 23:08:06 UTC (rev 34194)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/editor/check/ProjectNaturesChecker.java 2011-08-24 00:02:47 UTC (rev 34195)
@@ -25,6 +25,7 @@
import org.eclipse.ui.IWindowListener;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
+import org.jboss.tools.common.model.options.Preference;
import org.jboss.tools.common.reporting.ProblemReportingHelper;
import org.jboss.tools.jsf.ui.JsfUIMessages;
import org.jboss.tools.jst.jsp.JspEditorPlugin;
@@ -43,10 +44,6 @@
private ProjectNaturesPartListener partListener = new ProjectNaturesPartListener();
private static final String SEARCH_CLASS = "javax.faces.webapp.FacesServlet"; //$NON-NLS-1$
- public static final QualifiedName IS_JSF_NATURES_CHECK_NEED = new QualifiedName(
- "", JsfUIMessages.IS_JSF_NATURE_CHECK_NEED); //$NON-NLS-1$
- public static final QualifiedName IS_KB_NATURES_CHECK_NEED = new QualifiedName(
- "", JsfUIMessages.IS_KB_NATURE_CHECK_NEED); //$NON-NLS-1$
public static final QualifiedName IS_JSF_CHECK_NEED = new QualifiedName(
"", JsfUIMessages.IS_JSF_CHECK_NEED); //$NON-NLS-1$
private Set<IProject> projectsCollection;
@@ -86,9 +83,7 @@
public void checkNatures(IProject project) throws CoreException {
if (project != null && project.isAccessible()) {
addProject(project);
- updateProjectPersistentProperties(project);
- boolean isKBNaturesCheck = Boolean.parseBoolean(project
- .getPersistentProperty(IS_KB_NATURES_CHECK_NEED));
+ boolean isKBNaturesCheck = Preference.SHOW_NATURE_WARNING.getValue().equals("yes");
KbProject.checkKBBuilderInstalled(project);
String missingNature = checkMissingNatures(project);
if (missingNature != null) {
@@ -131,19 +126,6 @@
}
}
- private void updateProjectPersistentProperties(IProject project)
- throws CoreException {
- if (project.isAccessible()) {
- updateProjectJSFPersistents(project);
- if (project.getPersistentProperty(IS_JSF_NATURES_CHECK_NEED) == null) {
- project.setPersistentProperty(IS_JSF_NATURES_CHECK_NEED, Boolean.TRUE.toString());
- }
- if (project.getPersistentProperty(IS_KB_NATURES_CHECK_NEED) == null) {
- project.setPersistentProperty(IS_KB_NATURES_CHECK_NEED, Boolean.TRUE.toString());
- }
- }
- }
-
public IProject getProject(IProject project) {
return projectsCollection.contains(project) ? project : null;
}
14 years, 7 months
JBoss Tools SVN: r34194 - in trunk: seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/el and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2011-08-23 19:08:06 -0400 (Tue, 23 Aug 2011)
New Revision: 34194
Modified:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/QueryParticipantTestUtils.java
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/el/ELReferencesQueryParticipantTest.java
Log:
https://issues.jboss.org/browse/JBIDE-9473
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/QueryParticipantTestUtils.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/QueryParticipantTestUtils.java 2011-08-23 22:55:55 UTC (rev 34193)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/src/org/jboss/tools/jst/web/kb/test/QueryParticipantTestUtils.java 2011-08-23 23:08:06 UTC (rev 34194)
@@ -26,54 +26,53 @@
import org.jboss.tools.common.EclipseUtil;
import org.jboss.tools.common.util.FileUtil;
-public class QueryParticipantTestUtils extends TestCase{
+public class QueryParticipantTestUtils extends TestCase {
public static final int FIELD_SEARCH = 1;
public static final int METHOD_SEARCH = 2;
public static final int TYPE_SEARCH = 3;
public static final int PARAMETER_SEARCH = 4;
-
+
public static void testSearchParticipant(IProject project, String fileName, int searchType, String elementName, String parameterName, IQueryParticipant participant, List<MatchStructure> matches) throws CoreException{
IFile file = project.getFile(fileName);
- assertNotNull("File - "+fileName+" not found", file);
-
+ assertNotNull("File - " + fileName + " not found", file);
+
ICompilationUnit compilationUnit = EclipseUtil.getCompilationUnit(file);
-
+
assertNotNull("CompilationUnit not found", compilationUnit);
-
+
IJavaElement element = null;
-
+
IType type = compilationUnit.findPrimaryType();
-
+
assertNotNull("Primary type not found", type);
-
+
if(searchType == FIELD_SEARCH){
element = type.getField(elementName);
- }else if(searchType == METHOD_SEARCH){
+ } else if(searchType == METHOD_SEARCH){
element = getMethod(type, elementName);
- }else if(searchType == TYPE_SEARCH){
+ } else if(searchType == TYPE_SEARCH){
element = type;
- }else if(searchType == PARAMETER_SEARCH){
+ } else if(searchType == PARAMETER_SEARCH){
IMethod method = getMethod(type, elementName);
element = getParameter(method, parameterName);
}
-
- if(element != null){
- SearchRequestor requestor = new SearchRequestor();
-
- JavaSearchScopeFactory factory= JavaSearchScopeFactory.getInstance();
- IJavaSearchScope scope= factory.createWorkspaceScope(true);
- String description= factory.getWorkspaceScopeDescription(true);
- QuerySpecification specification = new ElementQuerySpecification(element, IJavaSearchConstants.REFERENCES, scope, description);
-
- participant.search(requestor, specification, new NullProgressMonitor());
-
- List<Match> matchesForCheck = requestor.getMatches();
-
- checkMatches(matchesForCheck, matches);
- }else
- fail("Java Element not found");
+
+ assertNotNull("Java Element not found", element);
+
+ SearchRequestor requestor = new SearchRequestor();
+
+ JavaSearchScopeFactory factory = JavaSearchScopeFactory.getInstance();
+ IJavaSearchScope scope = factory.createWorkspaceScope(true);
+ String description = factory.getWorkspaceScopeDescription(true);
+ QuerySpecification specification = new ElementQuerySpecification(element, IJavaSearchConstants.REFERENCES, scope, description);
+
+ participant.search(requestor, specification, new NullProgressMonitor());
+
+ List<Match> matchesForCheck = requestor.getMatches();
+
+ checkMatches(matchesForCheck, matches);
}
-
+
private static IMethod getMethod(IType type, String name) throws JavaModelException{
IMethod[] methods = type.getMethods();
for(IMethod method : methods){
@@ -85,35 +84,35 @@
private static ILocalVariable getParameter(IMethod method, String name) throws JavaModelException{
ILocalVariable[] parameters = method.getParameters();
- for(ILocalVariable parameter : parameters){
- if(parameter.getElementName().equals(name))
+ for(ILocalVariable parameter : parameters) {
+ if(parameter.getElementName().equals(name)) {
return parameter;
+ }
}
return null;
}
-
+
private static void checkMatches(List<Match> matchesForCheck, List<MatchStructure> matchList) throws CoreException {
for(Match match : matchesForCheck){
assertTrue("Match must return IFile", match.getElement() instanceof IFile);
-
+
IFile file = (IFile)match.getElement();
String filePath = file.getFullPath().toString();
String text = FileUtil.getContentFromEditorOrFile(file);
String name = text.substring(match.getOffset(), match.getOffset()+match.getLength());
-
+
MatchStructure ms = findMatch(matchList, match, filePath, name);
-
- assertNotNull("Unexpected match found (file - "+filePath+" name - "+name+")", ms);
+
+ assertNotNull("Unexpected match found (file - " + filePath + " name - " + name + ")", ms);
ms.checked = true;
}
-
+
for(MatchStructure ms : matchList){
assertTrue("Match not found (file - "+ms.path+" name - "+ms.name+")", ms.checked);
}
}
-
+
protected static MatchStructure findMatch(List<MatchStructure> matchList, Match match, String filePath, String name){
-
for(MatchStructure ms : matchList){
if(!ms.checked && ms.path.equals(filePath) && ms.name.equals(name)){
//System.out.println("Match found (file - "+ms.path+" name - "+ms.name+")");
@@ -123,29 +122,27 @@
return null;
}
-
- static class SearchRequestor implements ISearchRequestor{
+ static class SearchRequestor implements ISearchRequestor {
ArrayList<Match> matches = new ArrayList<Match>();
-
+
public void reportMatch(Match match){
matches.add(match);
}
-
+
public List<Match> getMatches(){
return matches;
}
}
-
+
public static class MatchStructure{
String path;
String name; // label
boolean checked;
-
+
public MatchStructure(String path, String name){
this.path = path;
this.name = name;
checked = false;
}
}
-
-}
+}
\ No newline at end of file
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/el/ELReferencesQueryParticipantTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/el/ELReferencesQueryParticipantTest.java 2011-08-23 22:55:55 UTC (rev 34193)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/el/ELReferencesQueryParticipantTest.java 2011-08-23 23:08:06 UTC (rev 34194)
@@ -5,29 +5,25 @@
import junit.framework.TestCase;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.jboss.tools.jst.web.kb.refactoring.ELReferencesQueryParticipant;
import org.jboss.tools.jst.web.kb.test.QueryParticipantTestUtils;
import org.jboss.tools.jst.web.kb.test.QueryParticipantTestUtils.MatchStructure;
-import org.jboss.tools.test.util.TestProjectProvider;
public class ELReferencesQueryParticipantTest extends TestCase{
- TestProjectProvider provider = null;
IProject project = null;
-
+
public void setUp() throws Exception {
- IResource project = ResourcesPlugin.getWorkspace().getRoot().findMember("numberguess");
- this.project = project.getProject();
+ project = ResourcesPlugin.getWorkspace().getRoot().getProject("numberguess");
}
public void testELReferencesQueryParticipantForType() throws CoreException{
ArrayList<MatchStructure> matches = new ArrayList<MatchStructure>();
-
+
matches.add(new MatchStructure("/numberguess/web/giveup.jspx", "numberGuess"));
matches.add(new MatchStructure("/numberguess/web/giveup.jspx", "numberGuess"));
-
+
QueryParticipantTestUtils.testSearchParticipant(project,
"src/org/jboss/seam/example/numberguess/NumberGuess.java",
QueryParticipantTestUtils.TYPE_SEARCH,
@@ -36,12 +32,12 @@
new ELReferencesQueryParticipant(),
matches);
}
-
+
public void testELReferencesQueryParticipantForMethod1() throws CoreException{
ArrayList<MatchStructure> matches = new ArrayList<MatchStructure>();
-
+
matches.add(new MatchStructure("/numberguess/web/giveup.jspx", "remainingGuesses"));
-
+
QueryParticipantTestUtils.testSearchParticipant(project,
"src/org/jboss/seam/example/numberguess/NumberGuess.java",
QueryParticipantTestUtils.METHOD_SEARCH,
@@ -53,9 +49,9 @@
public void testELReferencesQueryParticipantForMethod2() throws CoreException{
ArrayList<MatchStructure> matches = new ArrayList<MatchStructure>();
-
+
matches.add(new MatchStructure("/numberguess/web/giveup.jspx", "possibilities"));
-
+
QueryParticipantTestUtils.testSearchParticipant(project,
"src/org/jboss/seam/example/numberguess/NumberGuess.java",
QueryParticipantTestUtils.METHOD_SEARCH,
@@ -64,5 +60,4 @@
new ELReferencesQueryParticipant(),
matches);
}
-
-}
+}
\ No newline at end of file
14 years, 7 months
JBoss Tools SVN: r34193 - branches/jbosstools-3.2.x/seam/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-08-23 18:55:55 -0400 (Tue, 23 Aug 2011)
New Revision: 34193
Modified:
branches/jbosstools-3.2.x/seam/docs/reference/en-US/Book_Info.xml
branches/jbosstools-3.2.x/seam/docs/reference/en-US/Seam_Developer_Tools_Reference_Guide.xml
Log:
updated with removal of maven references for enterprise doc due to JBDS 4.1 not having maven atm
Modified: branches/jbosstools-3.2.x/seam/docs/reference/en-US/Book_Info.xml
===================================================================
--- branches/jbosstools-3.2.x/seam/docs/reference/en-US/Book_Info.xml 2011-08-23 22:55:44 UTC (rev 34192)
+++ branches/jbosstools-3.2.x/seam/docs/reference/en-US/Book_Info.xml 2011-08-23 22:55:55 UTC (rev 34193)
@@ -7,7 +7,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>4.1</productnumber>
<edition>4.1.0</edition>
- <pubsnumber>3</pubsnumber>
+ <pubsnumber>4</pubsnumber>
<abstract>
<para>The Seam Developer Tools Reference Guide explains how to use the Seam Developer Tools module to create Seam projects for deployment.</para>
</abstract>
Modified: branches/jbosstools-3.2.x/seam/docs/reference/en-US/Seam_Developer_Tools_Reference_Guide.xml
===================================================================
--- branches/jbosstools-3.2.x/seam/docs/reference/en-US/Seam_Developer_Tools_Reference_Guide.xml 2011-08-23 22:55:44 UTC (rev 34192)
+++ branches/jbosstools-3.2.x/seam/docs/reference/en-US/Seam_Developer_Tools_Reference_Guide.xml 2011-08-23 22:55:55 UTC (rev 34193)
@@ -6,7 +6,8 @@
<xi:include href="Preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="intro.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="creating_new_seam.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
-<xi:include href="creating_mavenized_seam.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
+<!--<xi:include href="creating_mavenized_seam.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
+</xi:include>-->
<xi:include href="directory_structure.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="seam_menus_and_actions.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
<xi:include href="seam_wizards.xml" xmlns:xi="http://www.w3.org/2001/XInclude"></xi:include>
14 years, 7 months
JBoss Tools SVN: r34192 - trunk/seam/docs/reference/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-08-23 18:55:44 -0400 (Tue, 23 Aug 2011)
New Revision: 34192
Modified:
trunk/seam/docs/reference/en-US/Book_Info.xml
Log:
updated with removal of maven references for enterprise doc due to JBDS 4.1 not having maven atm
Modified: trunk/seam/docs/reference/en-US/Book_Info.xml
===================================================================
--- trunk/seam/docs/reference/en-US/Book_Info.xml 2011-08-23 22:42:11 UTC (rev 34191)
+++ trunk/seam/docs/reference/en-US/Book_Info.xml 2011-08-23 22:55:44 UTC (rev 34192)
@@ -7,7 +7,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>4.1</productnumber>
<edition>4.1.0</edition>
- <pubsnumber>3</pubsnumber>
+ <pubsnumber>4</pubsnumber>
<abstract>
<para>The Seam Developer Tools Reference Guide explains how to use the Seam Developer Tools module to create Seam projects for deployment.</para>
</abstract>
14 years, 7 months
JBoss Tools SVN: r34191 - in trunk: common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2011-08-23 18:42:11 -0400 (Tue, 23 Aug 2011)
New Revision: 34191
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSF2CCAttrsELCompletionEngine.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java
Log:
Code cleanup: multiple instances are replaced with static final IRelevanceCheck implementation which always return false
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java 2011-08-23 22:32:14 UTC (rev 34190)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.seam.core/src/org/jboss/tools/cdi/seam/core/international/el/CDIInternationalMessagesELResolver.java 2011-08-23 22:42:11 UTC (rev 34191)
@@ -669,11 +669,7 @@
}
public IRelevanceCheck createRelevanceCheck(IJavaElement element) {
- return new IRelevanceCheck() {
- public boolean isRelevant(String content) {
- return false;
- }
- };
+ return IRRELEVANT;
}
IResourceBundle[] findResourceBundles (IBundleModel model) {
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java 2011-08-23 22:32:14 UTC (rev 34190)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/ca/AbstractELCompletionEngine.java 2011-08-23 22:42:11 UTC (rev 34191)
@@ -60,6 +60,13 @@
import org.jboss.tools.common.text.TextProposal;
public abstract class AbstractELCompletionEngine<V extends IVariable> implements ELResolver, ELCompletionEngine {
+
+ public static final IRelevanceCheck IRRELEVANT = new IRelevanceCheck() {
+ public boolean isRelevant(String content) {
+ return false;
+ }
+ };
+
public AbstractELCompletionEngine() {}
public abstract Image getELProposalImage();
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSF2CCAttrsELCompletionEngine.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSF2CCAttrsELCompletionEngine.java 2011-08-23 22:32:14 UTC (rev 34190)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSF2CCAttrsELCompletionEngine.java 2011-08-23 22:42:11 UTC (rev 34191)
@@ -639,13 +639,8 @@
public IRelevanceCheck createRelevanceCheck(IJavaElement element) {
- return new IRelevanceCheck() {
- public boolean isRelevant(String content) {
- return false;
- }
- };
+ return IRRELEVANT;
}
-
}
class JSF2CCAttrELSegmentImpl extends ELSegmentImpl {
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java 2011-08-23 22:32:14 UTC (rev 34190)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/JSFMessageELCompletionEngine.java 2011-08-23 22:42:11 UTC (rev 34191)
@@ -702,11 +702,7 @@
}
public IRelevanceCheck createRelevanceCheck(IJavaElement element) {
- return new IRelevanceCheck() {
- public boolean isRelevant(String content) {
- return false;
- }
- };
+ return IRRELEVANT;
}
}
\ No newline at end of file
14 years, 7 months
JBoss Tools SVN: r34190 - trunk/download.jboss.org/jbosstools/updates/requirements/testng.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-08-23 18:32:14 -0400 (Tue, 23 Aug 2011)
New Revision: 34190
Added:
trunk/download.jboss.org/jbosstools/updates/requirements/testng/build-6.0...
Modified:
trunk/download.jboss.org/jbosstools/updates/requirements/testng/build.xml
Log:
tweak testng build to fetch 6.1.1 bits in case we want to bump up to that version
Copied: trunk/download.jboss.org/jbosstools/updates/requirements/testng/build-6.0... (from rev 34189, trunk/download.jboss.org/jbosstools/updates/requirements/testng/build.xml)
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/testng/build-6.0... (rev 0)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/testng/build-6.0... 2011-08-23 22:32:14 UTC (rev 34190)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project default="mirror">
+ <!-- run locally in Eclipse (to resolve p2 tasks) using these commandline options:
+
+ -os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl}
+ -consoleLog -nosplash -data /tmp
+ -application org.eclipse.ant.core.antRunner
+ -f "/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/testng/build.xml"
+
+ or, run headless on qa01 server, where Eclipse is installed into ~/eclipse:
+
+ export JAVA_HOME=/opt/jdk1.6.0; \
+ ${JAVA_HOME}/bin/java -cp ~/eclipse/plugins/org.eclipse.equinox.launcher_*.jar \
+ org.eclipse.equinox.launcher.Main -vm ${JAVA_HOME} -consoleLog -nosplash -data /tmp \
+ -application org.eclipse.ant.core.antRunner \
+ -f ~/RHDS/updates/requirements/testng/build.xml -Ddestination=/tmp/pmd-repo
+ -->
+ <target name="mirror">
+ <property name="URL" value="http://beust.com/eclipse/" />
+ <property name="destination" value="/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/testng/6.0.1.20110418_1444/" />
+ <property name="compress" value="true" />
+
+ <p2.mirror>
+ <repository location="file:${destination}/6.0.1.20110418_1444/" name="testng plugins for Eclipse 3.6 - 3.7" />
+ <source>
+ <repository location="${URL}" />
+ </source>
+
+ <slicingoptions includefeatures="true" followstrict="true" latestversiononly="true" />
+ </p2.mirror>
+
+ <p2.publish.featuresAndBundles metadataRepository="file:${destination}/6.0.1.20110418_1444/" artifactRepository="file:${destination}/6.0.1.20110418_1444/" publishartifacts="true" source="${destination}/6.0.1.20110418_1444/" compress="${compress}" />
+ </target>
+</project>
Modified: trunk/download.jboss.org/jbosstools/updates/requirements/testng/build.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/updates/requirements/testng/build.xml 2011-08-23 22:21:50 UTC (rev 34189)
+++ trunk/download.jboss.org/jbosstools/updates/requirements/testng/build.xml 2011-08-23 22:32:14 UTC (rev 34190)
@@ -17,11 +17,11 @@
-->
<target name="mirror">
<property name="URL" value="http://beust.com/eclipse/" />
- <property name="destination" value="/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/testng/6.0.1.20110418_1444/" />
+ <property name="destination" value="/home/nboldt/tru/download.jboss.org/jbosstools/updates/requirements/testng/6.1.1.20110810_0944/" />
<property name="compress" value="true" />
<p2.mirror>
- <repository location="file:${destination}/6.0.1.20110418_1444/" name="testng plugins for Eclipse 3.6 - 3.7" />
+ <repository location="file:${destination}/6.1.1.20110810_0944/" name="testng plugins for Eclipse 3.6 - 3.7" />
<source>
<repository location="${URL}" />
</source>
@@ -29,6 +29,6 @@
<slicingoptions includefeatures="true" followstrict="true" latestversiononly="true" />
</p2.mirror>
- <p2.publish.featuresAndBundles metadataRepository="file:${destination}/6.0.1.20110418_1444/" artifactRepository="file:${destination}/6.0.1.20110418_1444/" publishartifacts="true" source="${destination}/6.0.1.20110418_1444/" compress="${compress}" />
+ <p2.publish.featuresAndBundles metadataRepository="file:${destination}/6.1.1.20110810_0944/" artifactRepository="file:${destination}/6.1.1.20110810_0944/" publishartifacts="true" source="${destination}/6.1.1.20110810_0944/" compress="${compress}" />
</target>
</project>
14 years, 7 months
JBoss Tools SVN: r34189 - in trunk/jsf/plugins/org.jboss.tools.jsf.ui: src/org/jboss/tools/jsf/ui/action and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-08-23 18:21:50 -0400 (Tue, 23 Aug 2011)
New Revision: 34189
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/META-INF/MANIFEST.MF
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/AddJSFNatureActionDelegate.java
Log:
JBIDE-9427
https://issues.jboss.org/browse/JBIDE-9427
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/META-INF/MANIFEST.MF 2011-08-23 22:21:03 UTC (rev 34188)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/META-INF/MANIFEST.MF 2011-08-23 22:21:50 UTC (rev 34189)
@@ -57,7 +57,8 @@
org.eclipse.pde.ui;bundle-version="3.6.100",
org.eclipse.jst.jsf.core;bundle-version="1.3.3",
org.eclipse.wst.common.project.facet.core;bundle-version="1.4.200",
- org.eclipse.wst.xml.ui;bundle-version="1.1.200"
+ org.eclipse.wst.xml.ui;bundle-version="1.1.200",
+ org.eclipse.wst.common.project.facet.ui
Bundle-Version: 3.3.0.qualifier
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/AddJSFNatureActionDelegate.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/AddJSFNatureActionDelegate.java 2011-08-23 22:21:03 UTC (rev 34188)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/action/AddJSFNatureActionDelegate.java 2011-08-23 22:21:50 UTC (rev 34189)
@@ -10,14 +10,30 @@
******************************************************************************/
package org.jboss.tools.jsf.ui.action;
+import java.util.Set;
+
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
import org.jboss.tools.common.meta.key.WizardKeys;
import org.jboss.tools.common.model.ui.util.ExtensionPointUtils;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.preference.PreferenceDialog;
import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.dialogs.PreferencesUtil;
+import org.eclipse.wst.common.project.facet.core.IFacetedProject;
+import org.eclipse.wst.common.project.facet.core.IFacetedProjectWorkingCopy;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.eclipse.wst.common.project.facet.ui.internal.ConvertProjectToFacetedFormRunnable;
+import org.eclipse.wst.common.project.facet.ui.internal.FacetsPropertyPage;
+import org.eclipse.wst.common.project.facet.ui.internal.SharedWorkingCopyManager;
import org.jboss.tools.common.model.ui.ModelUIPlugin;
import org.jboss.tools.common.model.ui.action.AddNatureActionDelegate;
+import org.jboss.tools.common.model.util.EclipseResourceUtil;
import org.jboss.tools.jsf.JSFModelPlugin;
import org.jboss.tools.jsf.project.JSFNature;
+import org.jboss.tools.jsf.ui.JsfUiPlugin;
import org.jboss.tools.jsf.ui.wizard.project.ImportProjectWizard;
public class AddJSFNatureActionDelegate extends AddNatureActionDelegate {
@@ -39,4 +55,56 @@
return JSFNature.NATURE_ID;
}
+ public void run(IAction action) {
+ ConvertProjectToFacetedFormRunnable.runInProgressDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), project);
+ try {
+ IFacetedProject fp = ProjectFacetsManager.create(project);
+ IFacetedProjectWorkingCopy wc = SharedWorkingCopyManager.getWorkingCopy(fp);
+
+ Set<IProjectFacetVersion> vs = wc.getProjectFacets();
+ IProjectFacetVersion web = null;
+ IProjectFacetVersion jsf = null;
+ for (IProjectFacetVersion v: vs) {
+ String id = v.getProjectFacet().getId();
+ if("jst.web".equals(id)) {
+ web = v;
+ } else if("jst.jsf".equals(id)) {
+ jsf = v;
+ }
+ }
+
+ if(web != null && jsf != null && wc.validate().isOK()) {
+ EclipseResourceUtil.addNatureToProject(project, JSFNature.NATURE_ID);
+ SharedWorkingCopyManager.releaseWorkingCopy(fp);
+ return;
+ }
+
+ if(web == null) {
+ web = ProjectFacetsManager.getProjectFacet("jst.web").getLatestVersion();
+ wc.addProjectFacet(web);
+ }
+ String webVersion = web.getVersionString();
+ if("2.2".equals(webVersion)) {
+ web = ProjectFacetsManager.getProjectFacet("jst.web").getVersion("2.3");
+ wc.changeProjectFacetVersion(web);
+ webVersion = web.getVersionString();
+ }
+ if(jsf == null) {
+ jsf = ProjectFacetsManager.getProjectFacet("jst.jsf").getLatestVersion();
+ if("2.3".equals(webVersion) || "2.4".equals(webVersion)) {
+ jsf = ProjectFacetsManager.getProjectFacet("jst.jsf").getVersion("1.1");
+ }
+ wc.addProjectFacet(jsf);
+ }
+
+ PreferenceDialog dialog = PreferencesUtil.createPropertyDialogOn(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), project, FacetsPropertyPage.ID, new String[] {FacetsPropertyPage.ID}, null);
+ dialog.open();
+
+ SharedWorkingCopyManager.releaseWorkingCopy(fp);
+ } catch (CoreException e) {
+ JsfUiPlugin.getDefault().logError(e);
+ }
+
+ }
+
}
14 years, 7 months
JBoss Tools SVN: r34188 - trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-08-23 18:21:03 -0400 (Tue, 23 Aug 2011)
New Revision: 34188
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/RemoveJSFNatureContribution.java
Log:
JBIDE-9427
https://issues.jboss.org/browse/JBIDE-9427
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/RemoveJSFNatureContribution.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/RemoveJSFNatureContribution.java 2011-08-23 22:20:19 UTC (rev 34187)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/model/handlers/RemoveJSFNatureContribution.java 2011-08-23 22:21:03 UTC (rev 34188)
@@ -24,24 +24,26 @@
public int execute() {
if(model == null) return 1;
XModelObject webxml = WebAppHelper.getWebApp(model);
- XModelObject servlet = WebAppHelper.findServlet(webxml,
- JSFConstants.FACES_SERVLET_CLASS, "Faces Config"); //$NON-NLS-1$
- String servletName = servlet == null ? null : servlet.getAttributeValue("servlet-name"); //$NON-NLS-1$
- XModelObject mapping = WebAppHelper.findServletMapping(webxml, servletName);
+ if(webxml != null) {
+ XModelObject servlet = WebAppHelper.findServlet(webxml,
+ JSFConstants.FACES_SERVLET_CLASS, "Faces Config"); //$NON-NLS-1$
+ String servletName = servlet == null ? null : servlet.getAttributeValue("servlet-name"); //$NON-NLS-1$
+ XModelObject mapping = WebAppHelper.findServletMapping(webxml, servletName);
- if(servlet != null) {
- DefaultRemoveHandler.removeFromParent(servlet);
- }
- if(mapping != null) {
- DefaultRemoveHandler.removeFromParent(mapping);
- }
- XModelObject folder = webxml.getChildByPath("Context Params"); //$NON-NLS-1$
- XModelObject[] params = folder.getChildren();
- for (int i = 0; i < params.length; i++) {
- String name = params[i].getAttributeValue("param-name"); //$NON-NLS-1$
- if(name != null && name.startsWith("javax.faces.")) { //$NON-NLS-1$
- DefaultRemoveHandler.removeFromParent(params[i]);
+ if(servlet != null) {
+ DefaultRemoveHandler.removeFromParent(servlet);
}
+ if(mapping != null) {
+ DefaultRemoveHandler.removeFromParent(mapping);
+ }
+ XModelObject folder = webxml.getChildByPath("Context Params"); //$NON-NLS-1$
+ XModelObject[] params = folder.getChildren();
+ for (int i = 0; i < params.length; i++) {
+ String name = params[i].getAttributeValue("param-name"); //$NON-NLS-1$
+ if(name != null && name.startsWith("javax.faces.")) { //$NON-NLS-1$
+ DefaultRemoveHandler.removeFromParent(params[i]);
+ }
+ }
}
IProject project = EclipseResourceUtil.getProject(model.getRoot());
14 years, 7 months
JBoss Tools SVN: r34187 - trunk/jst/tests/org.jboss.tools.jst.web.kb.test.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2011-08-23 18:20:19 -0400 (Tue, 23 Aug 2011)
New Revision: 34187
Modified:
trunk/jst/tests/org.jboss.tools.jst.web.kb.test/plugin.properties
Log:
JBIDE-9427
https://issues.jboss.org/browse/JBIDE-9427
Modified: trunk/jst/tests/org.jboss.tools.jst.web.kb.test/plugin.properties
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.kb.test/plugin.properties 2011-08-23 21:45:04 UTC (rev 34186)
+++ trunk/jst/tests/org.jboss.tools.jst.web.kb.test/plugin.properties 2011-08-23 22:20:19 UTC (rev 34187)
@@ -1,3 +1,4 @@
#Properties file for org.jboss.tools.jst.web.test
Bundle-Vendor.0 = JBoss by Red Hat
-Bundle-Name.0 = Tests Plug-in
\ No newline at end of file
+Bundle-Name.0 = Tests Plug-in
+KB_REQUIRED_FOR_FACET=Faceted (test environment only)
\ No newline at end of file
14 years, 7 months