Author: dazarov
Date: 2009-10-14 12:02:55 -0400 (Wed, 14 Oct 2009)
New Revision: 18090
Added:
trunk/common/plugins/org.jboss.tools.common.el.core/schema/elProjectSet.exsd
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ELProjectSetExtension.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ProjectsSet.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/ELProjectSet.java
Removed:
trunk/common/plugins/org.jboss.tools.common.el.core/schema/elSearcher.exsd
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ELSearcher.java
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ELSearcherExtension.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamELSearcher.java
Modified:
trunk/common/plugins/org.jboss.tools.common.el.core/plugin.xml
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/refactoring/ELReferencesQueryParticipant.java
trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml
Log:
https://jira.jboss.org/jira/browse/JBIDE-4989
Modified: trunk/common/plugins/org.jboss.tools.common.el.core/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/plugin.xml 2009-10-14 15:54:14 UTC
(rev 18089)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/plugin.xml 2009-10-14 16:02:55 UTC
(rev 18090)
@@ -2,6 +2,6 @@
<?eclipse version="3.4"?>
<plugin>
<extension-point id="elResolver" name="EL Resolver"
schema="schema/elResolver.exsd"/>
- <extension-point id="elSearcher" name="EL Search"
schema="schema/elSearcher.exsd"/>
+ <extension-point id="elProjectSet" name="EL Project Set"
schema="schema/elProjectSet.exsd"/>
</plugin>
Copied: trunk/common/plugins/org.jboss.tools.common.el.core/schema/elProjectSet.exsd (from
rev 18085, trunk/common/plugins/org.jboss.tools.common.el.core/schema/elSearcher.exsd)
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/schema/elProjectSet.exsd
(rev 0)
+++
trunk/common/plugins/org.jboss.tools.common.el.core/schema/elProjectSet.exsd 2009-10-14
16:02:55 UTC (rev 18090)
@@ -0,0 +1,127 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.jboss.tools.common.el.core"
xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.jboss.tools.common.el.core"
id="elSearch" name="EL Search"/>
+ </appinfo>
+ <documentation>
+ This extenion point is used to send information about seam project to search and
rename participants. In order to have one search participand and one rename participant
for seam and jsf projects.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence>
+ <element ref="project-set" minOccurs="1"
maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="point" type="string"
use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="project-set">
+ <complexType>
+ <attribute name="id" type="string"
use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="identifier"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="projectset-class" type="string"
use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java"
basedOn=":org.jboss.tools.common.el.core.refactoring.ProjectsSet"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ JBoss Tools 3.1
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ Copyright (c) 2009 Red Hat, Inc.
+Distributed under license by Red Hat, Inc. All rights reserved.
+This program is made available under the terms of the
+Eclipse Public License v1.0 which accompanies this distribution,
+and is available at
http://www.eclipse.org/legal/epl-v10.html
+
+Contributors:
+Red Hat, Inc. - initial API and implementation
+ </documentation>
+ </annotation>
+
+</schema>
Property changes on:
trunk/common/plugins/org.jboss.tools.common.el.core/schema/elProjectSet.exsd
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: trunk/common/plugins/org.jboss.tools.common.el.core/schema/elSearcher.exsd
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.el.core/schema/elSearcher.exsd 2009-10-14
15:54:14 UTC (rev 18089)
+++ trunk/common/plugins/org.jboss.tools.common.el.core/schema/elSearcher.exsd 2009-10-14
16:02:55 UTC (rev 18090)
@@ -1,127 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- Schema file written by PDE -->
-<schema targetNamespace="org.jboss.tools.common.el.core"
xmlns="http://www.w3.org/2001/XMLSchema">
-<annotation>
- <appinfo>
- <meta.schema plugin="org.jboss.tools.common.el.core"
id="elSearch" name="EL Search"/>
- </appinfo>
- <documentation>
- This extenion point is used to send information about seam project to search and
rename participants. In order to have one search participand and one rename participant
for seam and jsf projects.
- </documentation>
- </annotation>
-
- <element name="extension">
- <annotation>
- <appinfo>
- <meta.element />
- </appinfo>
- </annotation>
- <complexType>
- <sequence>
- <element ref="el-search" minOccurs="1"
maxOccurs="unbounded"/>
- </sequence>
- <attribute name="point" type="string"
use="required">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="id" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- </annotation>
- </attribute>
- <attribute name="name" type="string">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute translatable="true"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <element name="el-search">
- <complexType>
- <attribute name="id" type="string"
use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="identifier"/>
- </appinfo>
- </annotation>
- </attribute>
- <attribute name="searcher-class" type="string"
use="required">
- <annotation>
- <documentation>
-
- </documentation>
- <appinfo>
- <meta.attribute kind="java"
basedOn=":org.jboss.tools.common.el.core.refactoring.ELSearcher"/>
- </appinfo>
- </annotation>
- </attribute>
- </complexType>
- </element>
-
- <annotation>
- <appinfo>
- <meta.section type="since"/>
- </appinfo>
- <documentation>
- JBoss Tools 3.1
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="examples"/>
- </appinfo>
- <documentation>
- [Enter extension point usage example here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="apiinfo"/>
- </appinfo>
- <documentation>
- [Enter API information here.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="implementation"/>
- </appinfo>
- <documentation>
- [Enter information about supplied implementation of this extension point.]
- </documentation>
- </annotation>
-
- <annotation>
- <appinfo>
- <meta.section type="copyright"/>
- </appinfo>
- <documentation>
- Copyright (c) 2009 Red Hat, Inc.
-Distributed under license by Red Hat, Inc. All rights reserved.
-This program is made available under the terms of the
-Eclipse Public License v1.0 which accompanies this distribution,
-and is available at
http://www.eclipse.org/legal/epl-v10.html
-
-Contributors:
-Red Hat, Inc. - initial API and implementation
- </documentation>
- </annotation>
-
-</schema>
Copied:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ELProjectSetExtension.java
(from rev 18085,
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ELSearcherExtension.java)
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ELProjectSetExtension.java
(rev 0)
+++
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ELProjectSetExtension.java 2009-10-14
16:02:55 UTC (rev 18090)
@@ -0,0 +1,47 @@
+package org.jboss.tools.common.el.core.refactoring;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.common.el.core.Activator;
+
+public class ELProjectSetExtension {
+ public static String EXTENSION_POINT =
"org.jboss.tools.common.el.core.elProjectSet"; //$NON-NLS-1$
+
+ String id;
+ ProjectsSet searcher;
+
+ public ELProjectSetExtension() {}
+
+ public String getId() {
+ return id;
+ }
+
+ public ProjectsSet getProjectSet() {
+ return searcher;
+ }
+
+ static ELProjectSetExtension[] INSTANCES;
+
+ public static ELProjectSetExtension[] getInstances() {
+ if(INSTANCES != null) return INSTANCES;
+ List<ELProjectSetExtension> list = new ArrayList<ELProjectSetExtension>();
+ IExtensionPoint point =
Platform.getExtensionRegistry().getExtensionPoint(EXTENSION_POINT);
+ IConfigurationElement[] es = point.getConfigurationElements();
+ for (IConfigurationElement e: es) {
+ ELProjectSetExtension n = new ELProjectSetExtension();
+ n.id = e.getAttribute("id"); //$NON-NLS-1$
+ try{
+ n.searcher = (ProjectsSet)e.createExecutableExtension("projectset-class");
//$NON-NLS-1$
+ }catch(CoreException ex){
+ Activator.getDefault().logError(ex);
+ }
+ list.add(n);
+ }
+ return INSTANCES = list.toArray(new ELProjectSetExtension[0]);
+ }
+}
Property changes on:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ELProjectSetExtension.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ELSearcher.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ELSearcher.java 2009-10-14
15:54:14 UTC (rev 18089)
+++
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ELSearcher.java 2009-10-14
16:02:55 UTC (rev 18090)
@@ -1,31 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.common.el.core.refactoring;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-
-/**
- *
- * @author Daniel
- *
- * This interface is used for transmit information about seam project structure from seam
plugins through org.jboss.tools.common.el.core.elSearcher extension point
- */
-public interface ELSearcher {
- // inits seam project structure
- public void init(IProject project);
-
- // returns all linked seam projects
- public IProject[] getLinkedProjects();
-
- // returns view folder (like WEB_CONTENT, EAR_CONTENT) for each seam project
- public IContainer getViewFolder(IProject project);
-}
Deleted:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ELSearcherExtension.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ELSearcherExtension.java 2009-10-14
15:54:14 UTC (rev 18089)
+++
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ELSearcherExtension.java 2009-10-14
16:02:55 UTC (rev 18090)
@@ -1,47 +0,0 @@
-package org.jboss.tools.common.el.core.refactoring;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IConfigurationElement;
-import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Platform;
-import org.jboss.tools.common.el.core.Activator;
-
-public class ELSearcherExtension {
- public static String EXTENSION_POINT =
"org.jboss.tools.common.el.core.elSearcher"; //$NON-NLS-1$
-
- String id;
- ELSearcher searcher;
-
- public ELSearcherExtension() {}
-
- public String getId() {
- return id;
- }
-
- public ELSearcher getELSearcher() {
- return searcher;
- }
-
- static ELSearcherExtension[] INSTANCES;
-
- public static ELSearcherExtension[] getInstances() {
- if(INSTANCES != null) return INSTANCES;
- List<ELSearcherExtension> list = new ArrayList<ELSearcherExtension>();
- IExtensionPoint point =
Platform.getExtensionRegistry().getExtensionPoint(EXTENSION_POINT);
- IConfigurationElement[] es = point.getConfigurationElements();
- for (IConfigurationElement e: es) {
- ELSearcherExtension n = new ELSearcherExtension();
- n.id = e.getAttribute("id"); //$NON-NLS-1$
- try{
- n.searcher = (ELSearcher)e.createExecutableExtension("searcher-class");
//$NON-NLS-1$
- }catch(CoreException ex){
- Activator.getDefault().logError(ex);
- }
- list.add(n);
- }
- return INSTANCES = list.toArray(new ELSearcherExtension[0]);
- }
-}
Copied:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ProjectsSet.java
(from rev 18087,
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ELSearcher.java)
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ProjectsSet.java
(rev 0)
+++
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ProjectsSet.java 2009-10-14
16:02:55 UTC (rev 18090)
@@ -0,0 +1,41 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.common.el.core.refactoring;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+
+/**
+ *
+ * @author Daniel
+ *
+ * This interface is used for transmit information about seam project structure from seam
plugins through org.jboss.tools.common.el.core.elSearcher extension point
+ */
+public interface ProjectsSet {
+ /**
+ * inits seam project structure
+ * @param project
+ */
+ public void init(IProject project);
+
+ /**
+ * returns all linked seam projects
+ * @return
+ */
+ public IProject[] getLinkedProjects();
+
+ /**
+ * returns view folder (like WEB_CONTENT, EAR_CONTENT) for each seam project
+ * @param project
+ * @return
+ */
+ public IContainer getViewFolder(IProject project);
+}
Property changes on:
trunk/common/plugins/org.jboss.tools.common.el.core/src/org/jboss/tools/common/el/core/refactoring/ProjectsSet.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/refactoring/ELReferencesQueryParticipant.java
===================================================================
---
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/refactoring/ELReferencesQueryParticipant.java 2009-10-14
15:54:14 UTC (rev 18089)
+++
trunk/common/plugins/org.jboss.tools.common.el.ui/src/org/jboss/tools/common/el/ui/refactoring/ELReferencesQueryParticipant.java 2009-10-14
16:02:55 UTC (rev 18090)
@@ -28,13 +28,13 @@
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.search.ui.text.Match;
import org.eclipse.ui.PartInitException;
-import org.jboss.tools.common.el.core.refactoring.ELSearcher;
-import org.jboss.tools.common.el.core.refactoring.ELSearcherExtension;
+import org.jboss.tools.common.el.core.refactoring.ELProjectSetExtension;
+import org.jboss.tools.common.el.core.refactoring.ProjectsSet;
import org.jboss.tools.common.el.core.refactoring.RefactorSearcher;
import org.jboss.tools.common.model.project.ProjectHome;
public class ELReferencesQueryParticipant implements IQueryParticipant,
IMatchPresentation{
- private ELSearch search;
+ private ELSearcher searcher;
JavaSearchResultPage searchPage = null;
public int estimateTicks(QuerySpecification specification) {
@@ -55,10 +55,10 @@
IFile file = (IFile)qs.getElement().getResource();
String name = qs.getElement().getElementName();
- search = new ELSearch(requestor, qs.getElement(), file, name);
- search.setSearchScope(qs.getScope());
+ searcher = new ELSearcher(requestor, qs.getElement(), file, name);
+ searcher.setSearchScope(qs.getScope());
- search.findELReferences();
+ searcher.findELReferences();
}
}
}
@@ -71,18 +71,18 @@
int currentLength, boolean activate) throws PartInitException {
}
- class ELSearch extends RefactorSearcher{
+ class ELSearcher extends RefactorSearcher{
ISearchRequestor requestor;
- ELSearcher searcher=null;
+ ProjectsSet projectSet=null;
- public ELSearch(ISearchRequestor requestor, IJavaElement element, IFile file, String
name){
+ public ELSearcher(ISearchRequestor requestor, IJavaElement element, IFile file, String
name){
super(file, name, element);
this.requestor = requestor;
- ELSearcherExtension[] extensions = ELSearcherExtension.getInstances();
+ ELProjectSetExtension[] extensions = ELProjectSetExtension.getInstances();
if(extensions.length > 0){
- searcher = extensions[0].getELSearcher();
- if(searcher != null)
- searcher.init(file.getProject());
+ projectSet = extensions[0].getProjectSet();
+ if(projectSet != null)
+ projectSet.init(file.getProject());
}
}
@@ -105,15 +105,15 @@
}
protected IProject[] getProjects(){
- if(searcher != null){
- return searcher.getLinkedProjects();
+ if(projectSet != null){
+ return projectSet.getLinkedProjects();
}
return new IProject[]{baseFile.getProject()};
}
protected IContainer getViewFolder(IProject project){
- if(searcher != null){
- return searcher.getViewFolder(project);
+ if(projectSet != null){
+ return projectSet.getViewFolder(project);
}
IPath path =
ProjectHome.getFirstWebContentPath(baseFile.getProject()).removeFirstSegments(1);
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2009-10-14 15:54:14 UTC (rev
18089)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/plugin.xml 2009-10-14 16:02:55 UTC (rev
18090)
@@ -581,7 +581,7 @@
</extension>
<extension
- point="org.jboss.tools.common.el.core.elSearcher">
- <el-search id="seam.searcher"
searcher-class="org.jboss.tools.seam.internal.core.refactoring.SeamELSearcher"
/>
+ point="org.jboss.tools.common.el.core.elProjectSet">
+ <project-set id="seam.searcher"
projectset-class="org.jboss.tools.seam.internal.core.refactoring.ELProjectSet"
/>
</extension>
</plugin>
Copied:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/ELProjectSet.java
(from rev 18085,
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamELSearcher.java)
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/ELProjectSet.java
(rev 0)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/ELProjectSet.java 2009-10-14
16:02:55 UTC (rev 18090)
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.internal.core.refactoring;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IPath;
+import org.jboss.tools.common.el.core.refactoring.ProjectsSet;
+import org.jboss.tools.common.model.project.ProjectHome;
+import org.jboss.tools.seam.core.SeamProjectsSet;
+
+public class ELProjectSet implements ProjectsSet {
+ SeamProjectsSet projectsSet;
+ IProject project;
+
+ public void init(IProject project){
+ projectsSet = new SeamProjectsSet(project);
+ this.project = project;
+ }
+
+ public IProject[] getLinkedProjects() {
+ IProject[] projects = projectsSet.getAllProjects();
+ if(projects.length == 0 || projects[0] == null){
+ return new IProject[]{project};
+ }
+ return projects;
+ }
+
+ public IContainer getViewFolder(IProject project){
+ if(project.equals(projectsSet.getWarProject()))
+ return projectsSet.getDefaultViewsFolder();
+ else if(project.equals(projectsSet.getEarProject()))
+ return projectsSet.getDefaultEarViewsFolder();
+
+ IPath path = ProjectHome.getFirstWebContentPath(project).removeFirstSegments(1);
+
+ return project.getFolder(path);
+ }
+
+}
Property changes on:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/ELProjectSet.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamELSearcher.java
===================================================================
---
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamELSearcher.java 2009-10-14
15:54:14 UTC (rev 18089)
+++
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/refactoring/SeamELSearcher.java 2009-10-14
16:02:55 UTC (rev 18090)
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.seam.internal.core.refactoring;
-
-import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IPath;
-import org.jboss.tools.common.el.core.refactoring.ELSearcher;
-import org.jboss.tools.common.model.project.ProjectHome;
-import org.jboss.tools.seam.core.SeamProjectsSet;
-
-public class SeamELSearcher implements ELSearcher {
- SeamProjectsSet projectsSet;
- IProject project;
-
- public void init(IProject project){
- projectsSet = new SeamProjectsSet(project);
- this.project = project;
- }
-
- public IProject[] getLinkedProjects() {
- IProject[] projects = projectsSet.getAllProjects();
- if(projects.length == 0 || projects[0] == null){
- return new IProject[]{project};
- }
- return projects;
- }
-
- public IContainer getViewFolder(IProject project){
- if(project.equals(projectsSet.getWarProject()))
- return projectsSet.getDefaultViewsFolder();
- else if(project.equals(projectsSet.getEarProject()))
- return projectsSet.getDefaultEarViewsFolder();
-
- IPath path = ProjectHome.getFirstWebContentPath(project).removeFirstSegments(1);
-
- return project.getFolder(path);
- }
-
-}