JBoss Tools SVN: r8300 - trunk/documentation/guides/GettingStartedGuide/en/modules.
by jbosstools-commits@lists.jboss.org
Author: afedosik
Date: 2008-05-23 06:03:34 -0400 (Fri, 23 May 2008)
New Revision: 8300
Modified:
trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml
Log:
http://jira.jboss.com/jira/browse/JBDS-292 JBDS Install update version
Modified: trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml 2008-05-23 03:00:43 UTC (rev 8299)
+++ trunk/documentation/guides/GettingStartedGuide/en/modules/getting_started.xml 2008-05-23 10:03:34 UTC (rev 8300)
@@ -191,7 +191,7 @@
</listitem>
<listitem>
<para>Run in console:</para>
- <programlisting role="JAVA"><![CDATA[java -jar jbdevstudio-linux-gtk-1.1.0.CR1.jar
+ <programlisting role="JAVA"><![CDATA[java -jar jbdevstudio-linux-gtk-1.1.0.GA.jar
]]></programlisting>
</listitem>
<listitem>
17 years, 7 months
JBoss Tools SVN: r8299 - tags/jbosstools-2.1.0.GA.
by jbosstools-commits@lists.jboss.org
Author: mculpepper(a)jboss.com
Date: 2008-05-22 23:00:43 -0400 (Thu, 22 May 2008)
New Revision: 8299
Added:
tags/jbosstools-2.1.0.GA/as/
Log:
retagging AS
Copied: tags/jbosstools-2.1.0.GA/as (from rev 8298, branches/jbosstools-2.1.x/as)
17 years, 7 months
JBoss Tools SVN: r8297 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core: jbosscore/org/jboss/ide/eclipse/as/core/publishers and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-05-22 22:58:03 -0400 (Thu, 22 May 2008)
New Revision: 8297
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
Log:
JBIDE-2249 - patch commit from GA stream
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2008-05-23 02:43:21 UTC (rev 8296)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2008-05-23 02:58:03 UTC (rev 8297)
@@ -20,7 +20,8 @@
org.eclipse.wst.xml.core,
org.jboss.ide.eclipse.archives.core,
org.apache.ant,
- org.eclipse.jst.server.tomcat.core
+ org.eclipse.jst.server.tomcat.core,
+ org.eclipse.wst.web
Eclipse-LazyStart: true
Export-Package: org.jboss.ide.eclipse.as.core,
org.jboss.ide.eclipse.as.core.extensions.archives,
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2008-05-23 02:43:21 UTC (rev 8296)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2008-05-23 02:58:03 UTC (rev 8297)
@@ -24,6 +24,7 @@
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
+import java.util.ArrayList;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
@@ -118,7 +119,7 @@
protected IStatus fullPublish(IModule[] moduleTree, IModule module, IProgressMonitor monitor) throws CoreException {
- eventRoot.setProperty(PublisherEventLogger.CHANGED_RESOURCE_COUNT, countMembers(module));
+ eventRoot.setProperty(PublisherEventLogger.CHANGED_RESOURCE_COUNT, countChanges(delta));
IPath deployPath = getDeployPath(moduleTree);
ModuleDelegate md = (ModuleDelegate)module.loadAdapter(ModuleDelegate.class, monitor);
IModuleResource[] members = md.members();
@@ -130,8 +131,10 @@
IStatus[] results;
if( !deployPackaged(moduleTree))
results = new PublishUtil(server.getServer()).publishFull(members, deployPath, monitor);
+ else if( isBinaryObject(moduleTree))
+ results = copyBinaryModule(moduleTree);
else
- results = packModuleIntoJar(moduleTree[moduleTree.length-1], getDeployPath(moduleTree));
+ results = packModuleIntoJar(moduleTree[moduleTree.length-1], deployPath);
int length = results == null ? 0 : results.length;
for( int i = 0; i < length; i++ ) {
@@ -153,11 +156,15 @@
protected IStatus incrementalPublish(IModule[] moduleTree, IModule module, IProgressMonitor monitor) throws CoreException {
eventRoot.setProperty(PublisherEventLogger.CHANGED_RESOURCE_COUNT, countChanges(delta));
IStatus[] results = new IStatus[] {};
+ IPath deployPath = getDeployPath(moduleTree);
if( !deployPackaged(moduleTree))
- results = new PublishUtil(server.getServer()).publishDelta(delta, getDeployPath(moduleTree), monitor);
- else if( delta.length > 0 )
- results = packModuleIntoJar(moduleTree[moduleTree.length-1], getDeployPath(moduleTree));
-
+ results = new PublishUtil(server.getServer()).publishDelta(delta, deployPath, monitor);
+ else if( delta.length > 0 ) {
+ if( isBinaryObject(moduleTree))
+ results = copyBinaryModule(moduleTree);
+ else
+ results = packModuleIntoJar(moduleTree[moduleTree.length-1], deployPath);
+ }
int length = results == null ? 0 : results.length;
for( int i = 0; i < length; i++ ) {
new PublisherEventLogger.PublishUtilStatusWrapper(eventRoot, results[i]);
@@ -185,7 +192,7 @@
name = moduleTree[i].getName();
if( new Path(name).segmentCount() > 1 )
// we strongly suspect this is a binary object and not a project
- return root;
+ return root.append(new Path(name).lastSegment());
if( "jst.ear".equals(type))
root = root.append(name + ".ear");
else if( "jst.web".equals(type))
@@ -200,6 +207,65 @@
return root;
}
+ protected boolean isBinaryObject(IModule[] moduleTree) {
+ String name;
+ for( int i = 0; i < moduleTree.length; i++ ) {
+ name = moduleTree[i].getName();
+ if( new Path(name).segmentCount() > 1 )
+ // we strongly suspect this is a binary object and not a project
+ return true;
+ }
+ return false;
+ }
+
+
+ protected class FileUtilListener implements IFileUtilListener {
+ protected ArrayList<IStatus> errors = new ArrayList<IStatus>();
+ public void fileCoppied(File source, File dest, boolean result,
+ Exception e) {
+ if(!result)
+ errors.add(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "Error copying file " + source.toString() + " to " + dest.toString(), e));
+ }
+ public void fileDeleted(File file, boolean result, Exception e) {
+ if(!result)
+ errors.add(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "Error deleting file " + file.toString(), e));
+ }
+
+ public void folderDeleted(File file, boolean result, Exception e) {
+ if(!result)
+ errors.add(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "Error deleting folder " + file.toString(), e));
+ }
+
+ public IStatus[] getStatuses() {
+ return (IStatus[]) errors.toArray(new IStatus[errors.size()]);
+ }
+ }
+ protected IStatus[] copyBinaryModule(IModule[] moduleTree) {
+ try {
+ IPath deployPath = getDeployPath(moduleTree);
+ FileUtilListener listener = new FileUtilListener();
+ ModuleDelegate deployable =(ModuleDelegate)moduleTree[moduleTree.length-1].loadAdapter(ModuleDelegate.class, new NullProgressMonitor());
+ IModuleResource[] members = deployable.members();
+ File source = (File)members[0].getAdapter(File.class);
+ if( source == null ) {
+ IFile ifile = (IFile)members[0].getAdapter(IFile.class);
+ if( ifile != null )
+ source = ifile.getLocation().toFile();
+ }
+ if( source != null ) {
+ FileUtil.fileSafeCopy(source, deployPath.toFile(), listener);
+ return listener.getStatuses();
+ } else {
+ IStatus s = new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
+ "Could not publish module " + moduleTree[moduleTree.length-1]);
+ return new IStatus[] {s};
+ }
+ } catch( CoreException ce ) {
+ IStatus s = new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
+ "Could not publish module " + moduleTree[moduleTree.length-1], ce);
+ return new IStatus[] {s};
+ }
+ }
/**
*
* @param deployPath
17 years, 7 months
Re: [jbosstools-dev] Re: [jbosstools-commits] JBoss Tools SVN: r8244 - in branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core: META-INF and 1 other directory.
by Rob Stryker
Snjezana:
Thanks for your input. There certainly was no way we'd copy all 5 of
their classes (including TomcatPlugin! ha!), so for GA it was the right
move to make.
I tend to agree with Max, though, in regards to isolating the
functionality and limiting dependencies. I hate adding dependencies and
I hate I have so many as it is ;) I wish I could get my dependency list
down to next to nothing!
Anyway, thanks for the patch in the first place. I didn't mean to jump
on you like that and certainly not to discourage you from patching my
code when needbe.
Thanks so much for the help =]
Snjezana Peco wrote:
> There are three reasons why I decided to add a dependency:
> - we would have to copy at least 5 classes
> (TomcatSourcePathComputerDelegate, IModuleVisitor, ModuleTraverser,
> TomcatPlugin, org.eclipse.jst.server.tomcat.core.internal.Trace ...)
> - I have entered bug
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=233110 against wtp. When
> they fix this bug, we will revert changes (3 lines)
> - I don't like to have the same code in multiple places
> I don't see any problem with adding a new dependency because JBoss
> Tools already depends on wtp that includes the Tomcat adapter.
> I have seen that the ServerSourcePathComputerDelegate class is a
> duplicate of GenericServerSourcePathComputerDelegate, but have thought
> that the reason for that was removing the
> org.eclipse.jst.server.generic.jboss from JBDS what makes sense for me.
>
> Snjeza
>
> Rob Stryker wrote:
>> Max:
>>
>> I just found this commit today (I don't browse commit logs much)...
>> Is it better to depend on a new plugin or to copy the class in
>> question to a .xpl package?
>> I personally would have coppied the class. Snjeza decided to add a
>> dependency.
>>
>> Thoughts? I personally find it very silly that the AS adapter would
>> depend on the tomcat adapter.
>>
>> jbosstools-commits(a)lists.jboss.org wrote:
>>> Author: snjeza
>>> Date: 2008-05-20 17:21:12 -0400 (Tue, 20 May 2008)
>>> New Revision: 8244
>>>
>>> Modified:
>>>
>>> branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
>>>
>>>
>>> branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
>>>
>>> Log:
>>> JBIDE-2215 Unable to add User Library as Source Lookup Path to
>>> AS/EAP server
>>>
>>> Modified:
>>> branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
>>>
>>> ===================================================================
>>> ---
>>> branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
>>> 2008-05-20 21:09:49 UTC (rev 8243)
>>> +++
>>> branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
>>> 2008-05-20 21:21:12 UTC (rev 8244)
>>> @@ -19,7 +19,8 @@
>>> org.eclipse.jst.common.project.facet.core,
>>> org.eclipse.wst.xml.core,
>>> org.jboss.ide.eclipse.archives.core,
>>> - org.apache.ant
>>> + org.apache.ant,
>>> + org.eclipse.jst.server.tomcat.core
>>> Eclipse-LazyStart: true
>>> Export-Package: org.jboss.ide.eclipse.as.core,
>>> org.jboss.ide.eclipse.as.core.extensions.archives,
>>>
>>> Modified:
>>> branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
>>>
>>> ===================================================================
>>> ---
>>> branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
>>> 2008-05-20 21:09:49 UTC (rev 8243)
>>> +++
>>> branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
>>> 2008-05-20 21:21:12 UTC (rev 8244)
>>> @@ -253,7 +253,7 @@
>>> name="JBoss Application Server Startup Configuration"
>>> public="true"
>>>
>>> sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"
>>>
>>> -
>>> sourcePathComputerId="org.jboss.ide.eclipse.as.core.serverSourcePathComputer"/>
>>>
>>> +
>>> sourcePathComputerId="org.eclipse.jst.server.tomcat.core.sourcePathComputer"/>
>>>
>>> <launchConfigurationType
>>>
>>> delegate="org.jboss.ide.eclipse.as.core.server.internal.launch.DeployableLaunchConfiguration"
>>>
>>>
>>> id="org.jboss.ide.eclipse.as.core.server.stripped.launchConfiguration"
>>> @@ -261,7 +261,7 @@
>>> name="Stripped Server Launch Configuration"
>>> public="false"
>>>
>>> sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"
>>>
>>> -
>>> sourcePathComputerId="org.jboss.ide.eclipse.as.core.serverSourcePathComputer"/>
>>>
>>> +
>>> sourcePathComputerId="org.eclipse.jst.server.tomcat.core.sourcePathComputer"/>
>>>
>>> <launchConfigurationType
>>>
>>> delegate="org.jboss.ide.eclipse.as.core.server.internal.launch.TwiddleLaunchConfiguration"
>>>
>>>
>>> id="org.jboss.ide.eclipse.as.core.server.twiddleConfiguration"
>>>
>>> _______________________________________________
>>> jbosstools-commits mailing list
>>> jbosstools-commits(a)lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/jbosstools-commits
>>>
>>
>> _______________________________________________
>> jbosstools-dev mailing list
>> jbosstools-dev(a)lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/jbosstools-dev
>
17 years, 7 months
JBoss Tools SVN: r8296 - in branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core: jbosscore/org/jboss/ide/eclipse/as/core/publishers and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2008-05-22 22:43:21 -0400 (Thu, 22 May 2008)
New Revision: 8296
Modified:
branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
Log:
JBIDE-2249 - problems telling the difference between binary modules and project modules.
Modified: branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2008-05-23 01:32:22 UTC (rev 8295)
+++ branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2008-05-23 02:43:21 UTC (rev 8296)
@@ -20,7 +20,8 @@
org.eclipse.wst.xml.core,
org.jboss.ide.eclipse.archives.core,
org.apache.ant,
- org.eclipse.jst.server.tomcat.core
+ org.eclipse.jst.server.tomcat.core,
+ org.eclipse.wst.web
Eclipse-LazyStart: true
Export-Package: org.jboss.ide.eclipse.as.core,
org.jboss.ide.eclipse.as.core.extensions.archives,
Modified: branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
===================================================================
--- branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2008-05-23 01:32:22 UTC (rev 8295)
+++ branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2008-05-23 02:43:21 UTC (rev 8296)
@@ -24,6 +24,7 @@
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
+import java.util.ArrayList;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
@@ -118,7 +119,7 @@
protected IStatus fullPublish(IModule[] moduleTree, IModule module, IProgressMonitor monitor) throws CoreException {
- eventRoot.setProperty(PublisherEventLogger.CHANGED_RESOURCE_COUNT, countMembers(module));
+ eventRoot.setProperty(PublisherEventLogger.CHANGED_RESOURCE_COUNT, countChanges(delta));
IPath deployPath = getDeployPath(moduleTree);
ModuleDelegate md = (ModuleDelegate)module.loadAdapter(ModuleDelegate.class, monitor);
IModuleResource[] members = md.members();
@@ -130,8 +131,10 @@
IStatus[] results;
if( !deployPackaged(moduleTree))
results = new PublishUtil(server.getServer()).publishFull(members, deployPath, monitor);
+ else if( isBinaryObject(moduleTree))
+ results = copyBinaryModule(moduleTree);
else
- results = packModuleIntoJar(moduleTree[moduleTree.length-1], getDeployPath(moduleTree));
+ results = packModuleIntoJar(moduleTree[moduleTree.length-1], deployPath);
int length = results == null ? 0 : results.length;
for( int i = 0; i < length; i++ ) {
@@ -153,11 +156,15 @@
protected IStatus incrementalPublish(IModule[] moduleTree, IModule module, IProgressMonitor monitor) throws CoreException {
eventRoot.setProperty(PublisherEventLogger.CHANGED_RESOURCE_COUNT, countChanges(delta));
IStatus[] results = new IStatus[] {};
+ IPath deployPath = getDeployPath(moduleTree);
if( !deployPackaged(moduleTree))
- results = new PublishUtil(server.getServer()).publishDelta(delta, getDeployPath(moduleTree), monitor);
- else if( delta.length > 0 )
- results = packModuleIntoJar(moduleTree[moduleTree.length-1], getDeployPath(moduleTree));
-
+ results = new PublishUtil(server.getServer()).publishDelta(delta, deployPath, monitor);
+ else if( delta.length > 0 ) {
+ if( isBinaryObject(moduleTree))
+ results = copyBinaryModule(moduleTree);
+ else
+ results = packModuleIntoJar(moduleTree[moduleTree.length-1], deployPath);
+ }
int length = results == null ? 0 : results.length;
for( int i = 0; i < length; i++ ) {
new PublisherEventLogger.PublishUtilStatusWrapper(eventRoot, results[i]);
@@ -185,7 +192,7 @@
name = moduleTree[i].getName();
if( new Path(name).segmentCount() > 1 )
// we strongly suspect this is a binary object and not a project
- return root;
+ return root.append(new Path(name).lastSegment());
if( "jst.ear".equals(type))
root = root.append(name + ".ear");
else if( "jst.web".equals(type))
@@ -200,6 +207,65 @@
return root;
}
+ protected boolean isBinaryObject(IModule[] moduleTree) {
+ String name;
+ for( int i = 0; i < moduleTree.length; i++ ) {
+ name = moduleTree[i].getName();
+ if( new Path(name).segmentCount() > 1 )
+ // we strongly suspect this is a binary object and not a project
+ return true;
+ }
+ return false;
+ }
+
+
+ protected class FileUtilListener implements IFileUtilListener {
+ protected ArrayList<IStatus> errors = new ArrayList<IStatus>();
+ public void fileCoppied(File source, File dest, boolean result,
+ Exception e) {
+ if(!result)
+ errors.add(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "Error copying file " + source.toString() + " to " + dest.toString(), e));
+ }
+ public void fileDeleted(File file, boolean result, Exception e) {
+ if(!result)
+ errors.add(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "Error deleting file " + file.toString(), e));
+ }
+
+ public void folderDeleted(File file, boolean result, Exception e) {
+ if(!result)
+ errors.add(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "Error deleting folder " + file.toString(), e));
+ }
+
+ public IStatus[] getStatuses() {
+ return (IStatus[]) errors.toArray(new IStatus[errors.size()]);
+ }
+ }
+ protected IStatus[] copyBinaryModule(IModule[] moduleTree) {
+ try {
+ IPath deployPath = getDeployPath(moduleTree);
+ FileUtilListener listener = new FileUtilListener();
+ ModuleDelegate deployable =(ModuleDelegate)moduleTree[moduleTree.length-1].loadAdapter(ModuleDelegate.class, new NullProgressMonitor());
+ IModuleResource[] members = deployable.members();
+ File source = (File)members[0].getAdapter(File.class);
+ if( source == null ) {
+ IFile ifile = (IFile)members[0].getAdapter(IFile.class);
+ if( ifile != null )
+ source = ifile.getLocation().toFile();
+ }
+ if( source != null ) {
+ FileUtil.fileSafeCopy(source, deployPath.toFile(), listener);
+ return listener.getStatuses();
+ } else {
+ IStatus s = new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
+ "Could not publish module " + moduleTree[moduleTree.length-1]);
+ return new IStatus[] {s};
+ }
+ } catch( CoreException ce ) {
+ IStatus s = new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
+ "Could not publish module " + moduleTree[moduleTree.length-1], ce);
+ return new IStatus[] {s};
+ }
+ }
/**
*
* @param deployPath
17 years, 7 months
JBoss Tools SVN: r8295 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-05-22 21:32:22 -0400 (Thu, 22 May 2008)
New Revision: 8295
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java
Log:
JBIDE-2253 Ganymede RC1 : SWTResourceUtil cannot be resolved
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java 2008-05-23 01:32:17 UTC (rev 8294)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java 2008-05-23 01:32:22 UTC (rev 8295)
@@ -44,9 +44,10 @@
import org.eclipse.core.runtime.content.IContentTypeMatcher;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.LocalResourceManager;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.Viewer;
@@ -78,7 +79,6 @@
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.FileStoreEditorInput;
-import org.eclipse.ui.internal.util.SWTResourceUtil;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.archives.core.model.ArchivesModelCore;
@@ -98,7 +98,7 @@
*
*/
public class FilesetViewProvider extends SimplePropertiesViewExtension {
-
+
private static final String FILESET_KEY = "org.jboss.ide.eclipse.as.ui.views.server.providers.FilesetViewProvider.PropertyKey";
private Action createFilter, deleteFilter, editFilter, deleteFileAction, editFileAction;
@@ -470,7 +470,15 @@
}
public class FilesetLabelProvider extends LabelProvider {
- public Image getImage(Object element) {
+
+ private LocalResourceManager resourceManager;
+
+ public FilesetLabelProvider() {
+ super();
+ this.resourceManager = new LocalResourceManager(JFaceResources.getResources());
+ }
+
+ public Image getImage(Object element) {
if( element instanceof Fileset ) {
return PlatformUI.getWorkbench().getSharedImages()
.getImage(ISharedImages.IMG_OBJ_FOLDER);
@@ -488,12 +496,7 @@
descriptor = PlatformUI.getWorkbench().getSharedImages()
.getImageDescriptor(ISharedImages.IMG_OBJ_FILE);
}
- Image image = (Image)SWTResourceUtil.getImageTable().get(descriptor);
- if (image == null) {
- image = descriptor.createImage();
- SWTResourceUtil.getImageTable().put(descriptor, image);
- }
- return image;
+ return resourceManager.createImage(descriptor);
}
return null;
}
@@ -504,6 +507,13 @@
return element == null ? "" : element.toString();//$NON-NLS-1$
}
+
+ public void dispose() {
+ resourceManager.dispose();
+ resourceManager = null;
+ super.dispose();
+ }
+
}
public void fillContextMenu(Shell shell, IMenuManager menu, Object[] selection) {
17 years, 7 months
JBoss Tools SVN: r8294 - trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/xpl.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-05-22 21:32:17 -0400 (Thu, 22 May 2008)
New Revision: 8294
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/xpl/AnyAdaptableLabelProvider.java
Log:
JBIDE-2253 Ganymede RC1 : SWTResourceUtil cannot be resolved
Modified: trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/xpl/AnyAdaptableLabelProvider.java
===================================================================
--- trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/xpl/AnyAdaptableLabelProvider.java 2008-05-22 16:24:39 UTC (rev 8293)
+++ trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/workbench/xpl/AnyAdaptableLabelProvider.java 2008-05-23 01:32:17 UTC (rev 8294)
@@ -13,7 +13,12 @@
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.resource.ColorDescriptor;
+import org.eclipse.jface.resource.FontDescriptor;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.JFaceResources;
+import org.eclipse.jface.resource.LocalResourceManager;
+import org.eclipse.jface.resource.ResourceManager;
import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.IFontProvider;
@@ -25,11 +30,9 @@
import org.eclipse.swt.graphics.FontData;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.RGB;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorRegistry;
import org.eclipse.ui.IPropertyListener;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.internal.util.SWTResourceUtil;
import org.eclipse.ui.model.IWorkbenchAdapter;
import org.eclipse.ui.model.IWorkbenchAdapter2;
@@ -67,12 +70,14 @@
}
}
};
+ private ResourceManager resourceManager;
/**
* Creates a new workbench label provider.
*/
public AnyAdaptableLabelProvider() {
PlatformUI.getWorkbench().getEditorRegistry().addPropertyListener(editorRegistryListener);
+ this.resourceManager = new LocalResourceManager(JFaceResources.getResources());
}
/**
@@ -113,6 +118,8 @@
*/
public void dispose() {
PlatformUI.getWorkbench().getEditorRegistry().removePropertyListener(editorRegistryListener);
+ resourceManager.dispose();
+ resourceManager = null;
super.dispose();
}
@@ -163,12 +170,7 @@
//add any annotations to the image descriptor
descriptor = decorateImage(descriptor, element);
- Image image = (Image) SWTResourceUtil.getImageTable().get(descriptor);
- if (image == null) {
- image = descriptor.createImage();
- SWTResourceUtil.getImageTable().put(descriptor, image);
- }
- return image;
+ return resourceManager.createImage(descriptor);
}
/* (non-Javadoc)
@@ -217,12 +219,7 @@
return null;
}
- Font font = (Font) SWTResourceUtil.getFontTable().get(descriptor);
- if (font == null) {
- font = new Font(Display.getCurrent(), descriptor);
- SWTResourceUtil.getFontTable().put(descriptor, font);
- }
- return font;
+ return resourceManager.createFont(FontDescriptor.createFrom(descriptor));
}
private Color getColor(Object element, boolean forground) {
@@ -236,11 +233,6 @@
return null;
}
- Color color = (Color) SWTResourceUtil.getColorTable().get(descriptor);
- if (color == null) {
- color = new Color(Display.getCurrent(), descriptor);
- SWTResourceUtil.getColorTable().put(descriptor, color);
- }
- return color;
+ return resourceManager.createColor(ColorDescriptor.createFrom(descriptor));
}
}
17 years, 7 months
JBoss Tools SVN: r8244 - in branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core: META-INF and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2008-05-20 17:21:12 -0400 (Tue, 20 May 2008)
New Revision: 8244
Modified:
branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
JBIDE-2215 Unable to add User Library as Source Lookup Path to AS/EAP server
Modified: branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF
===================================================================
--- branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2008-05-20 21:09:49 UTC (rev 8243)
+++ branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/META-INF/MANIFEST.MF 2008-05-20 21:21:12 UTC (rev 8244)
@@ -19,7 +19,8 @@
org.eclipse.jst.common.project.facet.core,
org.eclipse.wst.xml.core,
org.jboss.ide.eclipse.archives.core,
- org.apache.ant
+ org.apache.ant,
+ org.eclipse.jst.server.tomcat.core
Eclipse-LazyStart: true
Export-Package: org.jboss.ide.eclipse.as.core,
org.jboss.ide.eclipse.as.core.extensions.archives,
Modified: branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2008-05-20 21:09:49 UTC (rev 8243)
+++ branches/jbosstools-2.1.x/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2008-05-20 21:21:12 UTC (rev 8244)
@@ -253,7 +253,7 @@
name="JBoss Application Server Startup Configuration"
public="true"
sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"
- sourcePathComputerId="org.jboss.ide.eclipse.as.core.serverSourcePathComputer"/>
+ sourcePathComputerId="org.eclipse.jst.server.tomcat.core.sourcePathComputer"/>
<launchConfigurationType
delegate="org.jboss.ide.eclipse.as.core.server.internal.launch.DeployableLaunchConfiguration"
id="org.jboss.ide.eclipse.as.core.server.stripped.launchConfiguration"
@@ -261,7 +261,7 @@
name="Stripped Server Launch Configuration"
public="false"
sourceLocatorId="org.eclipse.jdt.launching.sourceLocator.JavaSourceLookupDirector"
- sourcePathComputerId="org.jboss.ide.eclipse.as.core.serverSourcePathComputer"/>
+ sourcePathComputerId="org.eclipse.jst.server.tomcat.core.sourcePathComputer"/>
<launchConfigurationType
delegate="org.jboss.ide.eclipse.as.core.server.internal.launch.TwiddleLaunchConfiguration"
id="org.jboss.ide.eclipse.as.core.server.twiddleConfiguration"
17 years, 7 months