JBoss Tools SVN: r2899 - trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-08-03 15:14:09 -0400 (Fri, 03 Aug 2007)
New Revision: 2899
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/ModelTruezipBridge.java
Log:
bug caused internal jars to be read as folders (archive detector was null)
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/ModelTruezipBridge.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/ModelTruezipBridge.java 2007-08-03 19:13:37 UTC (rev 2898)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.core/src/main/org/jboss/ide/eclipse/archives/core/util/internal/ModelTruezipBridge.java 2007-08-03 19:14:09 UTC (rev 2899)
@@ -206,7 +206,7 @@
int fsLength = fs.getGlobalSourcePath().toOSString().length()+1;
for( int i = 0; i < inputFiles.length; i++ ) {
filesetRelative = inputFiles[i].toOSString().substring(fsLength);
- returnFiles[i] = new File(fsFile, filesetRelative, ArchiveDetector.NULL);
+ returnFiles[i] = new File(fsFile, filesetRelative, ArchiveDetector.DEFAULT);
}
return returnFiles;
}
18 years, 4 months
JBoss Tools SVN: r2898 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-08-03 15:13:37 -0400 (Fri, 03 Aug 2007)
New Revision: 2898
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/WarArchiveType.java
Log:
now finds the content folder properly.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/WarArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/WarArchiveType.java 2007-08-03 18:53:50 UTC (rev 2897)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/WarArchiveType.java 2007-08-03 19:13:37 UTC (rev 2898)
@@ -174,7 +174,7 @@
IVirtualComponent vc = ComponentCore.createComponent(project);
- IPath webContentPath = vc.getRootFolder().getUnderlyingFolder().getLocation();
+ IPath webContentPath = vc.getRootFolder().getUnderlyingFolder().getFullPath();
addFileset(project, topLevel, webContentPath.toOSString(), "**/*");
addClassesFileset(project, classes);
18 years, 4 months
JBoss Tools SVN: r2897 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-08-03 14:53:50 -0400 (Fri, 03 Aug 2007)
New Revision: 2897
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/WarArchiveType.java
Log:
now finds the content folder properly.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/WarArchiveType.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/WarArchiveType.java 2007-08-03 18:22:04 UTC (rev 2896)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/WarArchiveType.java 2007-08-03 18:53:50 UTC (rev 2897)
@@ -22,18 +22,23 @@
package org.jboss.ide.eclipse.as.core.packages.types;
import org.apache.tools.ant.DirectoryScanner;
+import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.jdt.core.IClasspathEntry;
import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jst.server.core.IWebModule;
+import org.eclipse.wst.common.componentcore.ComponentCore;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.util.ProjectModule;
import org.jboss.ide.eclipse.archives.core.model.DirectoryScannerFactory;
import org.jboss.ide.eclipse.archives.core.model.IArchive;
import org.jboss.ide.eclipse.archives.core.model.IArchiveFolder;
@@ -167,8 +172,10 @@
IArchiveFolder lib = addFolder(project, webinf, LIB);
IArchiveFolder classes = addFolder(project, webinf, CLASSES);
-// addFileset(project, topLevel, new Path(project.getName()).append(WEBCONTENT).toOSString(), null);
- addWebContentFileset(project, topLevel);
+
+ IVirtualComponent vc = ComponentCore.createComponent(project);
+ IPath webContentPath = vc.getRootFolder().getUnderlyingFolder().getLocation();
+ addFileset(project, topLevel, webContentPath.toOSString(), "**/*");
addClassesFileset(project, classes);
// package each child and add to lib folder
18 years, 4 months
JBoss Tools SVN: r2896 - in trunk/seam/plugins: org.jboss.tools.seam.xml.ui/resources/org/jboss/tools/seam/xml/ui/wizard/newfile and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-08-03 14:22:04 -0400 (Fri, 03 Aug 2007)
New Revision: 2896
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/resources/org/jboss/tools/seam/ui/wizard/SeamWebProjectWizBan.png
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/resources/org/jboss/tools/seam/xml/ui/wizard/newfile/SeamComponentsFile_wiz.png
Log:
http://jira.jboss.com/jira/browse/JBIDE-643
http://jira.jboss.com/jira/browse/JBIDE-637
update for Wizard Banners in
Seam Web Project Wizard
Seam Action Wizard
Seam Form Wizard
Seam Components File Wizard
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/resources/org/jboss/tools/seam/ui/wizard/SeamWebProjectWizBan.png
===================================================================
(Binary files differ)
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.ui/resources/org/jboss/tools/seam/ui/wizard/SeamWebProjectWizBan.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/resources/org/jboss/tools/seam/xml/ui/wizard/newfile/SeamComponentsFile_wiz.png
===================================================================
(Binary files differ)
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/resources/org/jboss/tools/seam/xml/ui/wizard/newfile/SeamComponentsFile_wiz.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
18 years, 4 months
JBoss Tools SVN: r2895 - in trunk/seam/plugins: org.jboss.tools.seam.ui/resources and 18 other directories.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-08-03 14:21:38 -0400 (Fri, 03 Aug 2007)
New Revision: 2895
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/resources/
trunk/seam/plugins/org.jboss.tools.seam.ui/resources/org/
trunk/seam/plugins/org.jboss.tools.seam.ui/resources/org/jboss/
trunk/seam/plugins/org.jboss.tools.seam.ui/resources/org/jboss/tools/
trunk/seam/plugins/org.jboss.tools.seam.ui/resources/org/jboss/tools/seam/
trunk/seam/plugins/org.jboss.tools.seam.ui/resources/org/jboss/tools/seam/ui/
trunk/seam/plugins/org.jboss.tools.seam.ui/resources/org/jboss/tools/seam/ui/wizard/
trunk/seam/plugins/org.jboss.tools.seam.ui/resources/org/jboss/tools/seam/ui/wizard/SeamActionWizBan.png
trunk/seam/plugins/org.jboss.tools.seam.ui/resources/org/jboss/tools/seam/ui/wizard/SeamFormWizBan.png
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/resources/org/
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/resources/org/jboss/
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/resources/org/jboss/tools/
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/resources/org/jboss/tools/seam/
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/resources/org/jboss/tools/seam/xml/
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/resources/org/jboss/tools/seam/xml/ui/
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/resources/org/jboss/tools/seam/xml/ui/wizard/
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/resources/org/jboss/tools/seam/xml/ui/wizard/newfile/
Removed:
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/resources/placeholder.txt
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/.classpath
trunk/seam/plugins/org.jboss.tools.seam.ui/build.properties
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizard.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/build.properties
trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/wizard/newfile/NewSeamComponentsFileWizard.java
Log:
http://jira.jboss.com/jira/browse/JBIDE-643
http://jira.jboss.com/jira/browse/JBIDE-637
update for Wizard Banners in
Seam Web Project Wizard
Seam Action Wizard
Seam Form Wizard
Seam Components File Wizard
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/.classpath
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/.classpath 2007-08-03 17:53:24 UTC (rev 2894)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/.classpath 2007-08-03 18:21:38 UTC (rev 2895)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/build.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/build.properties 2007-08-03 17:53:24 UTC (rev 2894)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/build.properties 2007-08-03 18:21:38 UTC (rev 2895)
@@ -3,4 +3,11 @@
bin.includes = plugin.xml,\
META-INF/,\
.,\
- icons/
+ icons/,\
+ resources/
+src.includes = resources/,\
+ plugin.xml,\
+ src/,\
+ icons/,\
+ build.properties,\
+ META-INF/
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/resources/org/jboss/tools/seam/ui/wizard/SeamActionWizBan.png
===================================================================
(Binary files differ)
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.ui/resources/org/jboss/tools/seam/ui/wizard/SeamActionWizBan.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/resources/org/jboss/tools/seam/ui/wizard/SeamFormWizBan.png
===================================================================
(Binary files differ)
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.ui/resources/org/jboss/tools/seam/ui/wizard/SeamFormWizBan.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-08-03 17:53:24 UTC (rev 2894)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/internal/project/facet/SeamInstallWizardPage.java 2007-08-03 18:21:38 UTC (rev 2895)
@@ -20,6 +20,7 @@
import org.eclipse.datatools.connectivity.db.generic.IDBConnectionProfileConstants;
import org.eclipse.datatools.connectivity.db.generic.ui.NewConnectionProfileWizard;
import org.eclipse.datatools.connectivity.ui.dse.dialogs.ProfileSelectionComposite;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.jst.j2ee.project.facet.IJ2EEModuleFacetInstallDataModelProperties;
@@ -46,6 +47,7 @@
import org.jboss.tools.seam.ui.widget.editor.IFieldEditor;
import org.jboss.tools.seam.ui.widget.editor.IFieldEditorFactory;
import org.jboss.tools.seam.ui.widget.editor.ITaggedFieldEditor;
+import org.jboss.tools.seam.ui.wizard.SeamFormWizard;
/**
* @author eskimo
@@ -140,6 +142,7 @@
public SeamInstallWizardPage() {
super("Seam Facet");
setTitle("Seam Facet");
+ setImageDescriptor(ImageDescriptor.createFromFile(SeamFormWizard.class, "SeamWebProjectWizBan.png"));
setDescription("Configure Seam Facest Settings");
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java 2007-08-03 17:53:24 UTC (rev 2894)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamActionWizard.java 2007-08-03 18:21:38 UTC (rev 2895)
@@ -15,6 +15,7 @@
import java.util.Map;
import org.eclipse.core.commands.operations.IUndoableOperation;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.INewWizard;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
@@ -31,7 +32,7 @@
public SeamActionWizard() {
super(CREATE_SEAM_ACTION);
setWindowTitle("New Seam Action");
- //setDefaultPageImageDescriptor();
+ setDefaultPageImageDescriptor(ImageDescriptor.createFromFile(SeamActionWizard.class, "SeamFormWizBan.png"));
addPage(new SeamActionWizardPage1());
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizard.java 2007-08-03 17:53:24 UTC (rev 2894)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamFormWizard.java 2007-08-03 18:21:38 UTC (rev 2895)
@@ -21,6 +21,7 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.INewWizard;
import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
@@ -37,6 +38,7 @@
public SeamFormWizard() {
super(CREATE_SEAM_FORM);
setWindowTitle("New Seam Form");
+ setDefaultPageImageDescriptor(ImageDescriptor.createFromFile(SeamActionWizard.class, "SeamFormWizBan.png"));
addPage(new SeamFormWizardPage1());
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java 2007-08-03 17:53:24 UTC (rev 2894)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/wizard/SeamProjectWizard.java 2007-08-03 18:21:38 UTC (rev 2895)
@@ -41,15 +41,10 @@
setWindowTitle("New Seam Project");
}
- protected ImageDescriptor getDefaultPageImageDescriptor() {
- final Bundle bundle = Platform.getBundle("org.jboss.tools.common.model.ui");
- final URL url = bundle.getEntry("images/xstudio/wizards/EclipseCreateNewProject.png");
- return ImageDescriptor.createFromURL(url);
- }
-
@Override
protected IWizardPage createFirstPage() {
IWizardPage page = super.createFirstPage();
+ page.setImageDescriptor(ImageDescriptor.createFromFile(SeamFormWizard.class, "SeamWebProjectWizBan.png"));
page.setTitle("Seam Web Project");
page.setDescription("Create standalone Seam Web Project");
return page;
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/build.properties
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml.ui/build.properties 2007-08-03 17:53:24 UTC (rev 2894)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml.ui/build.properties 2007-08-03 18:21:38 UTC (rev 2895)
@@ -3,7 +3,16 @@
plugin.properties,\
images/,\
META-INF/,\
- about.html
+ about.html,\
+ resources/
source.seam-xml-ui.jar = src/,\
resources/
jars.compile.order = seam-xml-ui.jar
+src.includes = resources/,\
+ src/,\
+ plugin.xml,\
+ plugin.properties,\
+ images/,\
+ build.properties,\
+ about.html,\
+ META-INF/
Deleted: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/resources/placeholder.txt
===================================================================
Modified: trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/wizard/newfile/NewSeamComponentsFileWizard.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/wizard/newfile/NewSeamComponentsFileWizard.java 2007-08-03 17:53:24 UTC (rev 2894)
+++ trunk/seam/plugins/org.jboss.tools.seam.xml.ui/src/org/jboss/tools/seam/xml/ui/wizard/newfile/NewSeamComponentsFileWizard.java 2007-08-03 18:21:38 UTC (rev 2895)
@@ -10,11 +10,16 @@
******************************************************************************/
package org.jboss.tools.seam.xml.ui.wizard.newfile;
+import org.eclipse.jface.resource.ImageDescriptor;
import org.jboss.tools.common.model.ui.wizard.newfile.NewFileContextEx;
import org.jboss.tools.common.model.ui.wizard.newfile.NewFileWizardEx;
public class NewSeamComponentsFileWizard extends NewFileWizardEx {
+ public NewSeamComponentsFileWizard() {
+ setDefaultPageImageDescriptor(ImageDescriptor.createFromFile(NewSeamComponentsFileWizard.class, "SeamComponentsFile_wiz.png"));
+ }
+
protected NewFileContextEx createNewFileContext() {
return new NewSeamComponentsFileContext();
}
18 years, 4 months
JBoss Tools SVN: r2894 - in trunk/hibernatetools/plugins/org.hibernate.eclipse: META-INF and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-08-03 13:53:24 -0400 (Fri, 03 Aug 2007)
New Revision: 2894
Added:
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/c3p0-0.9.1.jar
Removed:
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/c3p0-0.9.0.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/ehcache-1.2.jar
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse/.classpath
trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF
trunk/hibernatetools/plugins/org.hibernate.eclipse/build.properties
trunk/hibernatetools/plugins/org.hibernate.eclipse/hibernate-build.xml
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/hibernate3.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/tools/freemarker.jar
trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/tools/hibernate-tools.jar
Log:
updated dependencies
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/.classpath
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/.classpath 2007-08-03 17:51:07 UTC (rev 2893)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/.classpath 2007-08-03 17:53:24 UTC (rev 2894)
@@ -3,7 +3,6 @@
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/asm.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/asm-attrs.jar"/>
- <classpathentry exported="true" kind="lib" path="lib/hibernate/c3p0-0.9.0.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/commons-collections-2.1.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/commons-logging-1.0.4.jar"/>
<classpathentry exported="true" kind="lib" path="lib/hibernate/concurrent-1.3.2.jar"/>
@@ -36,5 +35,6 @@
<classpathentry exported="true" kind="lib" path="lib/hibernate/ehcache-1.2.3.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="lib" path="lib/hibernate/c3p0-0.9.1.jar"/>
<classpathentry kind="output" path="build/eclipse"/>
</classpath>
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF 2007-08-03 17:51:07 UTC (rev 2893)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/META-INF/MANIFEST.MF 2007-08-03 17:53:24 UTC (rev 2894)
@@ -2,11 +2,10 @@
Bundle-ManifestVersion: 2
Bundle-Name: Hibernate Core Plugin
Bundle-SymbolicName: org.hibernate.eclipse
-Bundle-Version: 3.2.0.beta9
+Bundle-Version: 3.2.0.beta10
Bundle-ClassPath: org.hibernate.eclipse.jar,
lib/hibernate/asm.jar,
lib/hibernate/asm-attrs.jar,
- lib/hibernate/c3p0-0.9.0.jar,
lib/hibernate/commons-collections-2.1.1.jar,
lib/hibernate/commons-logging-1.0.4.jar,
lib/hibernate/concurrent-1.3.2.jar,
@@ -37,7 +36,8 @@
lib/tools/jtidy-r8-20060801.jar,
lib/annotations/hibernate-entitymanager.jar,
lib/hibernate/javassist.jar,
- lib/hibernate/ehcache-1.2.3.jar
+ lib/hibernate/ehcache-1.2.3.jar,
+ lib/hibernate/c3p0-0.9.1.jar
Bundle-Activator: org.hibernate.eclipse.HibernatePlugin
Bundle-Vendor: Hibernate Team
Bundle-Localization: plugin
@@ -64,28 +64,37 @@
com.mchange.v1.db.sql,
com.mchange.v1.identicator,
com.mchange.v1.io,
+ com.mchange.v1.lang,
com.mchange.v1.util,
+ com.mchange.v1.xml,
com.mchange.v2,
com.mchange.v2.async,
com.mchange.v2.beans,
com.mchange.v2.c3p0,
+ com.mchange.v2.c3p0.cfg,
com.mchange.v2.c3p0.filter,
com.mchange.v2.c3p0.impl,
+ com.mchange.v2.c3p0.jboss,
+ com.mchange.v2.c3p0.management,
com.mchange.v2.c3p0.mbean,
com.mchange.v2.c3p0.stmt,
com.mchange.v2.c3p0.subst,
com.mchange.v2.c3p0.util,
com.mchange.v2.cfg,
+ com.mchange.v2.cfg.junit,
com.mchange.v2.coalesce,
com.mchange.v2.codegen,
com.mchange.v2.codegen.bean,
com.mchange.v2.codegen.intfc,
com.mchange.v2.debug,
+ com.mchange.v2.encounter,
com.mchange.v2.holders,
+ com.mchange.v2.io,
com.mchange.v2.lang,
com.mchange.v2.log,
com.mchange.v2.log.jdk14logging,
com.mchange.v2.log.log4j,
+ com.mchange.v2.management,
com.mchange.v2.naming,
com.mchange.v2.resourcepool,
com.mchange.v2.ser,
@@ -277,6 +286,7 @@
org.hibernate.ejb.transaction,
org.hibernate.ejb.util,
org.hibernate.engine,
+ org.hibernate.engine.loading,
org.hibernate.engine.query,
org.hibernate.engine.query.sql,
org.hibernate.engine.transaction,
@@ -291,6 +301,7 @@
org.hibernate.hql.ast.util,
org.hibernate.hql.classic,
org.hibernate.id,
+ org.hibernate.id.enhanced,
org.hibernate.id.insert,
org.hibernate.impl,
org.hibernate.intercept,
@@ -346,7 +357,6 @@
org.hibernate.tool.hbm2x,
org.hibernate.tool.hbm2x.doc,
org.hibernate.tool.hbm2x.pojo,
- org.hibernate.tool.hbm2x.seam,
org.hibernate.tool.hbm2x.visitor,
org.hibernate.tool.hbmlint,
org.hibernate.tool.hbmlint.detector,
@@ -489,8 +499,7 @@
org.objectweb.asm.attrs,
org.w3c.tidy,
org.w3c.tidy.ant,
- pojo,
- seam
+ pojo
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui.console,
org.eclipse.jface
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/build.properties
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/build.properties 2007-08-03 17:51:07 UTC (rev 2893)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/build.properties 2007-08-03 17:53:24 UTC (rev 2894)
@@ -8,7 +8,8 @@
lib/tools/jtidy-r8-20060801.jar,\
lib/annotations/hibernate-entitymanager.jar,\
lib/hibernate/javassist.jar,\
- lib/hibernate/ehcache-1.2.3.jar
+ lib/hibernate/ehcache-1.2.3.jar,\
+ lib/hibernate/c3p0-0.9.1.jar
jars.compile.order = org.hibernate.eclipse.jar
source.org.hibernate.eclipse.jar = src/
output.org.hibernate.eclipse.jar = bin/
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/hibernate-build.xml
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse/hibernate-build.xml 2007-08-03 17:51:07 UTC (rev 2893)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse/hibernate-build.xml 2007-08-03 17:53:24 UTC (rev 2894)
@@ -5,7 +5,7 @@
<project name="org.hibernate.eclipse" basedir="." default="update">
- <property name="hibernate.root" location="../../../../../hibernate/branch_3_2"/>
+ <property name="hibernate.root" location="/home/max/work/os/hibernate/branches/Branch_3_2"/>
<available file="${hibernate.root}" property="hibernate.root.exists"/>
<fail unless="hibernate.root.exists">hibernate.root needs to be set to the root of the hibernate svn checkout. Currently it is ${hibernate.root} which does not exist.</fail>
Deleted: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/c3p0-0.9.0.jar
===================================================================
(Binary files differ)
Added: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/c3p0-0.9.1.jar
===================================================================
(Binary files differ)
Property changes on: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/c3p0-0.9.1.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Deleted: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/ehcache-1.2.jar
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/hibernate/hibernate3.jar
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/tools/freemarker.jar
===================================================================
(Binary files differ)
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse/lib/tools/hibernate-tools.jar
===================================================================
(Binary files differ)
18 years, 4 months
JBoss Tools SVN: r2893 - in trunk/hibernatetools/plugins/org.hibernate.eclipse.console: schema and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: max.andersen(a)jboss.com
Date: 2007-08-03 13:51:07 -0400 (Fri, 03 Aug 2007)
New Revision: 2893
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/schema/exporters.exsd
Log:
Bye bye old dusty seam 0.x templates
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml 2007-08-03 17:16:33 UTC (rev 2892)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/plugin.xml 2007-08-03 17:51:07 UTC (rev 2893)
@@ -22,7 +22,7 @@
category="hibernatecategory"
name="Hibernate Configurations"
id="org.hibernate.eclipse.console.views.KnownConfigurationsView"/>
- <view
+ <!-- <view
category="hibernatecategory"
class="org.hibernate.eclipse.graph.EntityGraphView"
icon="icons/hibernate_small_icon.gif"
@@ -33,7 +33,7 @@
class="org.hibernate.eclipse.graph.RelationalGraphView"
icon="icons/hibernate_small_icon.gif"
id="org.hibernate.eclipse.graph.RelationalGraphView"
- name="Hibernate Relational Model"/>
+ name="Hibernate Relational Model"/> -->
<view
icon="icons/hibernate_small_icon.gif"
class="org.hibernate.eclipse.console.views.QueryPageTabView"
@@ -444,7 +444,7 @@
type="string"
value="dot.exe"/>
</exporter>
- <exporter
+ <!-- <exporter
classname="org.hibernate.tool.hbm2x.seam.SeamExporter"
description="JBoss Seam Skeleton App [beta] (misc)"
icon="icons/hibernate_small_icon.gif"
@@ -457,7 +457,7 @@
description="Application short name"
name="seam_shortname"
value="seamapp"/>
- </exporter>
+ </exporter> -->
</extension>
<extension
point="org.eclipse.ui.preferencePages">
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/schema/exporters.exsd
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/schema/exporters.exsd 2007-08-03 17:16:33 UTC (rev 2892)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/schema/exporters.exsd 2007-08-03 17:51:07 UTC (rev 2893)
@@ -6,14 +6,14 @@
<meta.schema plugin="org.hibernate.eclipse.console" id="exporters" name="Exporters"/>
</appInfo>
<documentation>
- [Enter description of this extension point.]
+
</documentation>
</annotation>
<element name="extension">
<complexType>
<sequence>
- <element ref="exporter"/>
+ <element ref="exporter" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
<attribute name="point" type="string" use="required">
<annotation>
@@ -52,7 +52,7 @@
</documentation>
</annotation>
<complexType>
- <sequence>
+ <sequence minOccurs="1" maxOccurs="unbounded">
<element ref="property"/>
</sequence>
<attribute name="classname" type="string" use="required">
18 years, 4 months
JBoss Tools SVN: r2892 - in trunk: jst/plugins/org.jboss.tools.jst.web.ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: vrubezhny
Date: 2007-08-03 13:16:33 -0400 (Fri, 03 Aug 2007)
New Revision: 2892
Modified:
trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.xml
trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
trunk/struts/plugins/org.jboss.tools.struts.ui/plugin.xml
Log:
http://jira.jboss.com/jira/browse/JBIDE-635 Red Hat Menu should be removed or rearranged
Red Hat menu is hidden
Red Hat Struts Modules Configuration Action is removed from the Menu
Report Problem, Red Hat Web Site and Red Hat Developer Studio Help Actions are moved to the Help Menu
Red Hat Struts Modules Configuration Action moved to RedHat Developer Studio product plugin to make it product dependent
Modified: trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.xml
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.xml 2007-08-03 17:15:14 UTC (rev 2891)
+++ trunk/common/plugins/org.jboss.tools.common.model.ui/plugin.xml 2007-08-03 17:16:33 UTC (rev 2892)
@@ -182,8 +182,10 @@
</modelObjectAdapter>
</extension>
<extension point="org.eclipse.ui.actionSets">
- <actionSet description="%actionSets.redhatMenu.description" id="org.jboss.tools.common.model.ui.actionSet" label="%actionSets.redhatMenu.label" visible="true">
- <menu id="org.jboss.tools.common.model.ui.redhat" label="%actionSets.redhatMenu.label">
+ <actionSet description="%actionSets.redhatMenu.description"
+ id="org.jboss.tools.common.model.ui.actionSet"
+ label="%actionSets.redhatMenu.label" visible="true">
+ <!-- menu id="org.jboss.tools.common.model.ui.redhat" label="%actionSets.redhatMenu.label">
<separator name="c">
</separator>
<separator name="a">
@@ -194,19 +196,23 @@
</separator>
<separator name="e"/>
<separator name="f"/>
- </menu>
+ </menu -->
+ <action
+ class="org.jboss.tools.common.model.ui.action.global.VisitCompanyActionDelegate"
+ id="org.jboss.tools.common.model.ui.action.global.VisitCompanyActionDelegate"
+ label="%action.visitsite.label"
+ menubarPath="help/helpStart.redhatdeveloperstudio"
+ tooltip="%action.visitsite.label">
+ </action>
<action
label="%action.reportproblem.label"
tooltip="%action.reportproblem.label"
class="org.jboss.tools.common.model.ui.action.global.ReportProblemActionDelegate"
- menubarPath="org.jboss.tools.common.model.ui.redhat/a"
+ menubarPath="help/helpStart.redhat"
id="org.jboss.tools.common.model.ui.action.global.ReportProblemActionDelegate">
</action>
<!--action class="org.jboss.tools.common.model.ui.action.global.VisitForumActionDelegate" id="org.jboss.tools.common.model.ui.action.global.VisitForumActionDelegate" label="%action.visitforum.label" menubarPath="org.jboss.tools.common.model.ui.redhat/a" tooltip="%action.visitforum.label">
</action-->
- <action class="org.jboss.tools.common.model.ui.action.global.VisitCompanyActionDelegate"
- id="org.jboss.tools.common.model.ui.action.global.VisitCompanyActionDelegate" label="%action.visitsite.label" menubarPath="org.jboss.tools.common.model.ui.redhat/b" tooltip="%action.visitsite.label">
- </action>
</actionSet>
</extension>
<extension point="org.eclipse.ui.preferencePages">
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2007-08-03 17:15:14 UTC (rev 2891)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2007-08-03 17:16:33 UTC (rev 2892)
@@ -42,11 +42,11 @@
<separator name="group1">
</separator>
</menu>
- <action
+ <!-- action
class="org.jboss.tools.jst.web.ui.action.OpenOnlineHelpActionDelegate"
id="org.jboss.tools.jst.web.ui.action.OpenOnlineHelpActionDelegate"
label="%actionSets_online_help.label"
- menubarPath="org.jboss.tools.common.model.ui.redhat/b"/>
+ menubarPath="org.jboss.tools.common.model.ui.redhat/b"/ -->
</actionSet>
<actionSet description="%actionSets.serverActions.description" id="org.jboss.tools.jst.web.ui.server.actionSet" label="%actionSets.serverActions.label" visible="true">
<action class="org.jboss.tools.jst.web.ui.action.server.SelectServerActionDelegate" icon="images/xstudio/actions/tomcat/tomcat.gif" id="org.jboss.tools.jst.web.ui.action.server.SelectServerActionDelegate" label="%actionSets.serverActions.selectServer.label" style="pulldown" toolbarPath="Normal/SelectServer" tooltip="%actionSets.serverActions.selectServer.label">
Modified: trunk/struts/plugins/org.jboss.tools.struts.ui/plugin.xml
===================================================================
--- trunk/struts/plugins/org.jboss.tools.struts.ui/plugin.xml 2007-08-03 17:15:14 UTC (rev 2891)
+++ trunk/struts/plugins/org.jboss.tools.struts.ui/plugin.xml 2007-08-03 17:16:33 UTC (rev 2892)
@@ -188,7 +188,7 @@
</objectContribution>
</extension>
<extension point="org.eclipse.ui.actionSets">
- <actionSet description="Red Hat Struts Modules Configuration" id="org.jboss.tools.struts.modules" label="Red Hat Struts Modules Configuration" visible="true">
+ <!-- actionSet description="Red Hat Struts Modules Configuration" id="org.jboss.tools.struts.modules" label="Red Hat Struts Modules Configuration" visible="true">
<action class="org.jboss.tools.struts.ui.internal.action.ModulesConfigurationActionDelegate" enablesFor="1" id="org.jboss.tools.struts.ui.internal.action.ModulesConfigurationActionDelegate" label="Red Hat Struts Modules Configuration" menubarPath="org.jboss.tools.common.model.ui.redhat/c">
</action>
<menu id="org.jboss.tools.common.model.ui.redhat" label="Red Hat">
@@ -197,7 +197,7 @@
<separator name="d"/>
<separator name="b"/>
</menu>
- </actionSet>
+ </actionSet -->
<actionSet description="%actionSets.projectActions.description" id="org.jboss.tools.common.studio.actionSet" label="%actionSets.projectActions.label" visible="false">
<!--toolbarPath="Normal/SSProject"-->
<action class="org.jboss.tools.struts.ui.internal.action.ImportProjectAction" icon="images/xstudio/wizards/import_project.gif" id="org.jboss.tools.common.xstudio.action1" label="%actionSets.projectActions.importStrutsProject.label" tooltip="%actionSets.projectActions.importStrutsProject.label">
18 years, 4 months
JBoss Tools SVN: r2891 - in trunk/seam/plugins/org.jboss.tools.seam.ui: META-INF and 4 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-08-03 13:15:14 -0400 (Fri, 03 Aug 2007)
New Revision: 2891
Added:
trunk/seam/plugins/org.jboss.tools.seam.ui/icons/view/package.gif
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/actions/ScopePresentationActionProvider.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF
trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUiImages.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/AbstractSeamContentProvider.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamJarFilter.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamLabelProvider.java
Log:
JBIDE-610,JBIDE-652
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF 2007-08-03 17:14:52 UTC (rev 2890)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/META-INF/MANIFEST.MF 2007-08-03 17:15:14 UTC (rev 2891)
@@ -11,6 +11,7 @@
org.eclipse.ui.ide,
org.eclipse.ui.forms,
org.eclipse.ui.navigator,
+ org.eclipse.ui.navigator.resources,
org.eclipse.jst.servlet.ui,
org.eclipse.wst.web.ui,
org.eclipse.wst.common.project.facet.ui,
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/icons/view/package.gif
===================================================================
(Binary files differ)
Property changes on: trunk/seam/plugins/org.jboss.tools.seam.ui/icons/view/package.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2007-08-03 17:14:52 UTC (rev 2890)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/plugin.xml 2007-08-03 17:15:14 UTC (rev 2891)
@@ -147,7 +147,14 @@
</or>
</enablement>
</actionProvider>
+ <actionProvider
+ class="org.jboss.tools.seam.ui.views.actions.ScopePresentationActionProvider"
+ id="a1">
+ <enablement>
+ </enablement>
+ </actionProvider>
</navigatorContent>
+
<commonFilter
class="org.jboss.tools.seam.ui.views.SeamJarFilter"
description="Hide Seam Components loaded from libraries and not overriden in project"
@@ -194,6 +201,12 @@
</or>
</enablement>
</actionProvider>
+ <actionProvider
+ class="org.jboss.tools.seam.ui.views.actions.ScopePresentationActionProvider"
+ id="a2">
+ <enablement>
+ </enablement>
+ </actionProvider>
</navigatorContent>
</extension>
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUiImages.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUiImages.java 2007-08-03 17:14:52 UTC (rev 2890)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/SeamUiImages.java 2007-08-03 17:15:14 UTC (rev 2891)
@@ -25,6 +25,7 @@
public static Image ROLE_IMAGE = getImage("view/role.gif");
public static Image JAVA_IMAGE = getImage("view/java.gif");
public static Image JAVA_BINARY_IMAGE = getImage("view/java_binary.gif");
+ public static Image PACKAGE_IMAGE = getImage("view/package.gif");
public static Image getImage(String key) {
return INSTANCE.createImageDescriptor(key).createImage();
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 2007-08-03 17:14:52 UTC (rev 2890)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/AbstractSeamContentProvider.java 2007-08-03 17:15:14 UTC (rev 2891)
@@ -33,11 +33,13 @@
import org.jboss.tools.seam.core.ISeamComponentDeclaration;
import org.jboss.tools.seam.core.ISeamElement;
import org.jboss.tools.seam.core.ISeamJavaComponentDeclaration;
+import org.jboss.tools.seam.core.ISeamPackage;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.ISeamScope;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.event.ISeamProjectChangeListener;
import org.jboss.tools.seam.core.event.SeamProjectChangeEvent;
+import org.jboss.tools.seam.ui.views.actions.ScopePresentationActionProvider;
/**
* Basic type for content providers that add seam components
@@ -58,11 +60,19 @@
IResourceChangeListener listener = new ResourceChangeListener();
Set<ISeamProject> processed = new HashSet<ISeamProject>();
+
public AbstractSeamContentProvider() {}
public Object[] getElements(Object inputElement) {
return getChildren(inputElement);
}
+
+ boolean isNotShowingScopeNodes() {
+ return ScopePresentationActionProvider.isScopePresentedAsLabel();
+// if(viewer == null) return false;
+// Boolean b = (Boolean)viewer.getData("scopeAsNode");
+// return b != null && b.booleanValue();
+ }
public boolean hasChildren(Object element) {
if(element instanceof ISeamComponentDeclaration) return false;
@@ -72,10 +82,18 @@
public Object[] getChildren(Object parentElement) {
if(parentElement instanceof ISeamProject) {
- return ((ISeamProject)parentElement).getScopes();
+ ISeamProject project = (ISeamProject)parentElement;
+ if(isNotShowingScopeNodes()) {
+ project.resolve();
+ return project.getPackages().toArray(new Object[0]);
+ }
+ return project.getScopes();
} else if(parentElement instanceof ISeamScope) {
((ISeamScope)parentElement).getSeamProject().resolve();
- return ((ISeamScope)parentElement).getComponents().toArray(new Object[0]);
+ return ((ISeamScope)parentElement).getPackages().toArray(new Object[0]);
+// return ((ISeamScope)parentElement).getComponents().toArray(new Object[0]);
+ } else if(parentElement instanceof ISeamPackage) {
+ return ((ISeamPackage)parentElement).getComponents().toArray(new Object[0]);
} else if(parentElement instanceof ISeamComponent) {
List<Object> children = new ArrayList<Object>();
Set<ISeamComponentDeclaration> ds = ((ISeamComponent)parentElement).getAllDeclarations();
@@ -96,6 +114,17 @@
ISeamElement p = ((IRole)element).getParent();
return p == null ? p : p.getParent();
} else if(element instanceof ISeamElement) {
+ if(element instanceof ISeamComponent) {
+ ISeamComponent c = (ISeamComponent)element;
+ if(isNotShowingScopeNodes()) {
+ return c.getSeamProject().getPackage(c);
+ } else {
+ ISeamScope s = (ISeamScope)c.getParent();
+ ISeamPackage p = s.getPackage(c);
+ return p == null ? s : p;
+
+ }
+ }
return ((ISeamElement)element).getParent();
}
return null;
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamJarFilter.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamJarFilter.java 2007-08-03 17:14:52 UTC (rev 2890)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamJarFilter.java 2007-08-03 17:15:14 UTC (rev 2891)
@@ -17,6 +17,7 @@
import org.eclipse.jface.viewers.ViewerFilter;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamComponentDeclaration;
+import org.jboss.tools.seam.core.ISeamPackage;
/**
*
@@ -30,6 +31,9 @@
if(element instanceof ISeamComponent) {
return isUserDefinedComponent((ISeamComponent)element);
}
+ if(element instanceof ISeamPackage) {
+ return isUserDefinedPackage((ISeamPackage)element);
+ }
return true;
}
@@ -41,10 +45,14 @@
return true;
}
}
-
return false;
}
+ boolean isUserDefinedPackage(ISeamPackage p) {
+ for (ISeamComponent c : p.getComponents()) {
+ if(isUserDefinedComponent(c)) return true;
+ }
+ return false;
+ }
-
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamLabelProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamLabelProvider.java 2007-08-03 17:14:52 UTC (rev 2890)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/SeamLabelProvider.java 2007-08-03 17:15:14 UTC (rev 2891)
@@ -29,11 +29,13 @@
import org.jboss.tools.seam.core.ISeamElement;
import org.jboss.tools.seam.core.ISeamJavaComponentDeclaration;
import org.jboss.tools.seam.core.ISeamJavaSourceReference;
+import org.jboss.tools.seam.core.ISeamPackage;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.ISeamScope;
import org.jboss.tools.seam.internal.core.SeamComponentDeclaration;
import org.jboss.tools.seam.internal.core.SeamProject;
import org.jboss.tools.seam.ui.SeamUiImages;
+import org.jboss.tools.seam.ui.views.actions.ScopePresentationActionProvider;
/**
* @author Viacheslav Kabanovich
@@ -48,8 +50,15 @@
return ((IProjectNature)element).getProject().getName();
} else if(element instanceof ISeamScope) {
return ((ISeamScope)element).getType().getLabel();
+ } else if(element instanceof ISeamPackage) {
+ return ((ISeamPackage)element).getName();
} else if(element instanceof ISeamComponent) {
- return ((ISeamComponent)element).getName();
+ ISeamComponent c = (ISeamComponent)element;
+ String name = c.getName();
+ if(ScopePresentationActionProvider.isScopePresentedAsLabel()) {
+ name += " " + ((ISeamScope)c.getParent()).getType().getLabel();
+ }
+ return name;
} else if (element instanceof IRole) {
return "" + ((IRole)element).getName();
} else if(element instanceof ISeamJavaSourceReference) {
@@ -76,6 +85,8 @@
return SeamUiImages.PROJECT_IMAGE;
} else if(obj instanceof ISeamScope) {
return SeamUiImages.SCOPE_IMAGE;
+ } else if(obj instanceof ISeamPackage) {
+ return SeamUiImages.PACKAGE_IMAGE;
} else if(obj instanceof ISeamComponent) {
return SeamUiImages.COMPONENT_IMAGE;
} else if(obj instanceof IRole) {
Added: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/actions/ScopePresentationActionProvider.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/actions/ScopePresentationActionProvider.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/views/actions/ScopePresentationActionProvider.java 2007-08-03 17:15:14 UTC (rev 2891)
@@ -0,0 +1,132 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.ui.views.actions;
+
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.jface.action.ContributionItem;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.Separator;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.custom.BusyIndicator;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.navigator.CommonActionProvider;
+import org.jboss.tools.seam.core.SeamPreferences;
+
+/**
+ * Action provider for Seam Components view.
+ * @author Viacheslav Kabanovich
+ */
+public class ScopePresentationActionProvider extends CommonActionProvider {
+ public static String SCOPE_PRESENTATION = "seam.scopePresentation";
+
+ public static boolean isScopePresentedAsLabel() {
+ String s = SeamPreferences.getInstancePreference(SCOPE_PRESENTATION);
+ return "label".equals(s);
+ }
+
+ public void setScopePresentedAsLabel(boolean s) {
+ IEclipsePreferences p = SeamPreferences.getInstancePreferences();
+ p.put(SCOPE_PRESENTATION, s ? "label" : "node");
+ }
+
+ public ScopePresentationActionProvider() {}
+
+ public void fillContextMenu(IMenuManager menu) {
+ }
+
+ public void fillActionBars(IActionBars actionBars) {
+ if(scopePresentation == null) {
+ scopePresentation = new ScopePresentationContribution();
+ IMenuManager menuManager = actionBars.getMenuManager();
+ String SEP_NAME = "aaa";
+ if(menuManager.find(IWorkbenchActionConstants.MB_ADDITIONS) != null)
+ menuManager.insertAfter(IWorkbenchActionConstants.MB_ADDITIONS, new Separator(SEP_NAME));
+ else
+ menuManager.add(new Separator(SEP_NAME));
+ menuManager.appendToGroup(SEP_NAME, scopePresentation);
+ actionBars.updateActionBars();
+ }
+ }
+
+ ScopePresentationContribution scopePresentation = null;
+ boolean scopeAsNode = !isScopePresentedAsLabel();
+
+ class ScopePresentationContribution extends ContributionItem {
+ boolean filled = false;
+ public void fill(Menu menu, int index) {
+ if(filled) return;
+ filled = true;
+ MenuItem item = new MenuItem(menu, SWT.CASCADE);
+ item.setText("Scope Presentation");
+ Menu smenu = new Menu(item);
+ item.setMenu(smenu);
+ final MenuItem item1 = new MenuItem(smenu, SWT.RADIO);
+ item1.setText("As node");
+ item1.setSelection(scopeAsNode);
+ item1.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+ public void widgetSelected(SelectionEvent e) {
+ if(item1.getSelection() && !scopeAsNode) {
+ scopeAsNode = true;
+ setUpViewer();
+ }
+ }
+
+ });
+ final MenuItem item2 = new MenuItem(smenu, SWT.RADIO);
+ item2.setText("As label");
+ item2.setSelection(!scopeAsNode);
+ item2.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+ public void widgetSelected(SelectionEvent e) {
+ if(item2.getSelection() && scopeAsNode) {
+ scopeAsNode = false;
+ setUpViewer();
+ }
+ }
+
+ });
+ }
+
+ }
+
+ public void dispose() {
+ scopePresentation = null;
+ super.dispose();
+ }
+
+ void setUpViewer() {
+ setScopePresentedAsLabel(!scopeAsNode);
+ BusyIndicator.showWhile(PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getShell().getDisplay(),
+ new Runnable() {
+ public void run() {
+ try {
+ getActionSite().getStructuredViewer().refresh();
+ } catch (Exception e2) {
+ //ignore
+ }
+ }
+ }
+ );
+ }
+
+}
18 years, 4 months
JBoss Tools SVN: r2890 - in trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam: internal/core and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2007-08-03 13:14:52 -0400 (Fri, 03 Aug 2007)
New Revision: 2890
Added:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamPackage.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPackage.java
Modified:
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProject.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamScope.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamScope.java
Log:
JBIDE-610,JBIDE-652
Added: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamPackage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamPackage.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamPackage.java 2007-08-03 17:14:52 UTC (rev 2890)
@@ -0,0 +1,24 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.seam.core;
+
+import java.util.Set;
+
+/**
+ * @author Viacheslav Kabanovich
+ */
+public interface ISeamPackage extends ISeamElement {
+
+ public String getName();
+
+ public Set<ISeamComponent> getComponents();
+
+}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProject.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProject.java 2007-08-03 16:29:25 UTC (rev 2889)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamProject.java 2007-08-03 17:14:52 UTC (rev 2890)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.seam.core;
+import java.util.Collection;
import java.util.Set;
import org.eclipse.core.resources.IProject;
@@ -37,6 +38,19 @@
* @return
*/
public ISeamScope getScope(ScopeType scopeType);
+
+ /**
+ * Returns packages
+ * @return
+ */
+ public Collection<ISeamPackage> getPackages();
+
+ /**
+ * Finds package object in this project for component.
+ * @param c
+ * @return
+ */
+ public ISeamPackage getPackage(ISeamComponent c);
/**
* Returns seam component. Project can have only one ISeamComponent with
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamScope.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamScope.java 2007-08-03 16:29:25 UTC (rev 2889)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/ISeamScope.java 2007-08-03 17:14:52 UTC (rev 2890)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.seam.core;
+import java.util.Collection;
import java.util.List;
/**
@@ -28,5 +29,18 @@
* @return list of all seam components resolved to this scope
*/
public List<ISeamComponent> getComponents();
+
+ /**
+ *
+ * @return collection of all packages
+ */
+ public Collection<ISeamPackage> getPackages();
+
+ /**
+ *
+ * @param c
+ * @return
+ */
+ public ISeamPackage getPackage(ISeamComponent c);
}
Added: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPackage.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPackage.java (rev 0)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPackage.java 2007-08-03 17:14:52 UTC (rev 2890)
@@ -0,0 +1,32 @@
+package org.jboss.tools.seam.internal.core;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jboss.tools.seam.core.ISeamComponent;
+import org.jboss.tools.seam.core.ISeamPackage;
+
+public class SeamPackage extends SeamObject implements ISeamPackage {
+ Set<ISeamComponent> components = new HashSet<ISeamComponent>();
+ public String name;
+
+ public SeamPackage() {}
+
+ public SeamPackage(String name) {
+ setName(name);
+ }
+
+ public Set<ISeamComponent> getComponents() {
+ return components;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ setId(name);
+ }
+
+}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-08-03 16:29:25 UTC (rev 2889)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamProject.java 2007-08-03 17:14:52 UTC (rev 2890)
@@ -38,6 +38,7 @@
import org.jboss.tools.seam.core.ISeamElement;
import org.jboss.tools.seam.core.ISeamFactory;
import org.jboss.tools.seam.core.ISeamJavaComponentDeclaration;
+import org.jboss.tools.seam.core.ISeamPackage;
import org.jboss.tools.seam.core.ISeamProject;
import org.jboss.tools.seam.core.ISeamScope;
import org.jboss.tools.seam.core.ISeamXmlComponentDeclaration;
@@ -78,6 +79,8 @@
Set<ISeamContextVariable> allVariables = new HashSet<ISeamContextVariable>();
Map<String, SeamJavaComponentDeclaration> javaDeclarations = new HashMap<String, SeamJavaComponentDeclaration>();
+ Map<String, ISeamPackage> packages = new HashMap<String, ISeamPackage>();
+
List<ISeamProjectChangeListener> listeners = new ArrayList<ISeamProjectChangeListener>();
SeamValidationContext validationContext;
@@ -112,7 +115,16 @@
public ISeamScope getScope(ScopeType scopeType) {
return scopesMap.get(scopeType);
}
+
+ public Collection<ISeamPackage> getPackages() {
+ return packages.values();
+ }
+ public ISeamPackage getPackage(ISeamComponent c) {
+ String pkg = getPackageName(c);
+ return packages.get(pkg);
+ }
+
public ISeamProject getSeamProject() {
return this;
}
@@ -247,7 +259,7 @@
}
if(!sourcePaths.contains(source)) sourcePaths.add(source);
- revalidateScopesLock++;
+ revalidateLock++;
Map<Object,ISeamComponentDeclaration> currentComponents = findComponentDeclarations(source);
@@ -326,8 +338,8 @@
componentDeclarationsRemoved(currentComponents);
- revalidateScopesLock--;
- revalidateScopes();
+ revalidateLock--;
+ revalidate();
Map<Object, ISeamFactory> currentFactories = findFactoryDeclarations(source);
List<Change> addedFactories = null;
@@ -389,7 +401,7 @@
public void pathRemoved(IPath source) {
if(!sourcePaths.contains(source)) return;
sourcePaths.remove(source);
- revalidateScopesLock++;
+ revalidateLock++;
Iterator<SeamComponent> iterator = allComponents.values().iterator();
while(iterator.hasNext()) {
List<Change> changes = null;
@@ -413,8 +425,8 @@
}
fireChanges(changes);
}
- revalidateScopesLock--;
- revalidateScopes();
+ revalidateLock--;
+ revalidate();
Iterator<ISeamFactory> factories = allFactories.iterator();
while(factories.hasNext()) {
@@ -740,10 +752,16 @@
return result;
}
- int revalidateScopesLock = 0;
+ int revalidateLock = 0;
+
+ void revalidate() {
+ if(revalidateLock > 0) return;
+ revalidateScopes();
+ revalidatePackages();
+ }
+
void revalidateScopes() {
List<Change> changes = null;
- if(revalidateScopesLock > 0) return;
for(SeamComponent c : allComponents.values()) {
SeamScope pc = (SeamScope)c.getParent();
SeamScope pn = (SeamScope)getScope(c.getScope());
@@ -756,9 +774,65 @@
pn.addComponent(c);
changes = Change.addChange(changes, new Change(pn, null, null, c));
}
+ for (int i = 0; i < scopes.length; i++) {
+ scopes[i].revalidatePackages();
+ }
fireChanges(changes);
}
+ void revalidatePackages() {
+ List<Change> changes = null;
+ for (ISeamPackage p : packages.values()) {
+ Iterator<ISeamComponent> cs = p.getComponents().iterator();
+ while(cs.hasNext()) {
+ ISeamComponent c = cs.next();
+ String pkg = getPackageName(c);
+ if(allComponents.get(c.getName()) == null || !p.getName().equals(pkg)) {
+ cs.remove();
+ changes = Change.addChange(changes, new Change(p, null, c, null));
+ }
+ }
+ }
+ for (ISeamComponent c : getComponents()) {
+ String pkg = getPackageName(c);
+ ISeamPackage p = findOrCreatePackage(this, packages, pkg);
+ if(p.getComponents().contains(c)) continue;
+ p.getComponents().add(c);
+ changes = Change.addChange(changes, new Change(p, null, null, c));
+ }
+ Iterator<String> ps = packages.keySet().iterator();
+ while(ps.hasNext()) {
+ ISeamPackage p = packages.get(ps.next());
+ if(p.getComponents().size() == 0) {
+ ps.remove();
+ changes = Change.addChange(changes, new Change(this, null, p, null));
+ }
+ }
+ fireChanges(changes);
+ }
+
+ static String getPackageName(ISeamComponent c) {
+ String cls = c.getClassName();
+ if(cls == null || cls.length() == 0) {
+ return "<Unspecified>";
+ } else {
+ int d = cls.lastIndexOf('.');
+ return (d < 0) ? "<default>" : cls.substring(0, d);
+ }
+ }
+
+ static ISeamPackage findOrCreatePackage(ISeamElement parent, Map<String, ISeamPackage> packages, String name) {
+ ISeamPackage p = packages.get(name);
+ if(p == null) {
+ SeamPackage pi = new SeamPackage(name);
+ pi.setParent(parent);
+ pi.setSourcePath(parent.getSourcePath());
+ p = pi;
+ packages.put(name, pi);
+ }
+ return p;
+ }
+
protected void addToBuildSpec(String builderID) throws CoreException {
IProjectDescription description = getProject().getDescription();
@@ -801,4 +875,5 @@
return;
}
}
+
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamScope.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamScope.java 2007-08-03 16:29:25 UTC (rev 2889)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamScope.java 2007-08-03 17:14:52 UTC (rev 2890)
@@ -1,15 +1,23 @@
package org.jboss.tools.seam.internal.core;
import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
+import java.util.Map;
import org.jboss.tools.seam.core.ISeamComponent;
+import org.jboss.tools.seam.core.ISeamPackage;
import org.jboss.tools.seam.core.ISeamScope;
import org.jboss.tools.seam.core.ScopeType;
+import org.jboss.tools.seam.core.event.Change;
public class SeamScope extends SeamObject implements ISeamScope {
private List<ISeamComponent> components = new ArrayList<ISeamComponent>();
private ScopeType scopeType = null;
+
+ Map<String, ISeamPackage> packages = new HashMap<String, ISeamPackage>();
SeamScope(SeamProject project, ScopeType scopeType) {
setParent(project);
@@ -20,6 +28,15 @@
return components;
}
+ public Collection<ISeamPackage> getPackages() {
+ return packages.values();
+ }
+
+ public ISeamPackage getPackage(ISeamComponent c) {
+ String pkg = SeamProject.getPackageName(c);
+ return packages.get(pkg);
+ }
+
public void addComponent(ISeamComponent component) {
components.add(component);
}
@@ -32,4 +49,35 @@
return scopeType;
}
+ void revalidatePackages() {
+ List<Change> changes = null;
+ for (ISeamPackage p : packages.values()) {
+ Iterator<ISeamComponent> cs = p.getComponents().iterator();
+ while(cs.hasNext()) {
+ ISeamComponent c = cs.next();
+ String pkg = SeamProject.getPackageName(c);
+ if(!components.contains(c) || !p.getName().equals(pkg)) {
+ cs.remove();
+ changes = Change.addChange(changes, new Change(p, null, c, null));
+ }
+ }
+ }
+ for (ISeamComponent c : getComponents()) {
+ String pkg = SeamProject.getPackageName(c);
+ ISeamPackage p = SeamProject.findOrCreatePackage(this, packages, pkg);
+ if(p.getComponents().contains(c)) continue;
+ p.getComponents().add(c);
+ changes = Change.addChange(changes, new Change(p, null, null, c));
+ }
+ Iterator<String> ps = packages.keySet().iterator();
+ while(ps.hasNext()) {
+ ISeamPackage p = packages.get(ps.next());
+ if(p.getComponents().size() == 0) {
+ ps.remove();
+ changes = Change.addChange(changes, new Change(this, null, p, null));
+ }
+ }
+ ((SeamProject)getSeamProject()).fireChanges(changes);
+ }
+
}
18 years, 4 months