JBoss Tools SVN: r19446 - branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-12-17 13:45:25 -0500 (Thu, 17 Dec 2009)
New Revision: 19446
Modified:
branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/JBossESBRuntimeContainerPage.java
Log:
JBIDE-5497
Modified: branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/JBossESBRuntimeContainerPage.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/JBossESBRuntimeContainerPage.java 2009-12-17 18:44:36 UTC (rev 19445)
+++ branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/JBossESBRuntimeContainerPage.java 2009-12-17 18:45:25 UTC (rev 19446)
@@ -36,12 +36,19 @@
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableColumn;
+import org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog;
+import org.eclipse.ui.internal.dialogs.WorkbenchPreferenceDialog;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.ui.ServerUICore;
@@ -58,6 +65,7 @@
private IClasspathEntry entry;
private TableViewer runtimeViewer;
private Object selectedRuntime;
+ private Button manageRuntimes;
public JBossESBRuntimeContainerPage(){
super(JBossESBUIMessages.JBoss_ESBRuntime_Classpath_Container_Title);
@@ -77,19 +85,16 @@
public void createControl(Composite parent) {
Composite com = new Composite(parent, SWT.NONE);
- com.setLayout(new GridLayout());
+ com.setLayout(new FormLayout());
com.setLayoutData(new GridData(GridData.FILL_BOTH));
Table table = new Table(com, SWT.BORDER);
runtimeViewer = new TableViewer(table);
- runtimeViewer.getTable().setLayoutData(new GridData(GridData.FILL_BOTH));
runtimeViewer.addSelectionChangedListener(new ISelectionChangedListener(){
-
public void selectionChanged(SelectionChangedEvent event) {
IStructuredSelection selection = (StructuredSelection)event.getSelection();
selectedRuntime = selection.getFirstElement();
setPageComplete(isPageComplete());
-
}});
runtimeViewer.addFilter(new ESBRuntimeFilter());
@@ -111,11 +116,41 @@
runtimeViewer.setContentProvider(new ArrayContentProvider());
runtimeViewer.setLabelProvider(new RuntimeLabelProvider());
+
+ // button
+ manageRuntimes = new Button(com, SWT.DEFAULT);
+ manageRuntimes.setText(JBossESBUIMessages.JBoss_ESBRuntime_Classpath_Container_Manage_Runtimes_Button);
+ manageRuntimes.addSelectionListener(new SelectionListener() {
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ public void widgetSelected(SelectionEvent e) {
+ manageRuntimesPressed();
+ }
+ });
+ // layout
+ FormData fd = new FormData();
+ fd.left = new FormAttachment(0, 5);
+ fd.bottom = new FormAttachment(100,-5);
+ manageRuntimes.setLayoutData(fd);
+
+ fd = new FormData();
+ fd.top = new FormAttachment(0,5);
+ fd.left = new FormAttachment(0,5);
+ fd.right = new FormAttachment(100,-5);
+ fd.bottom = new FormAttachment(manageRuntimes,-5);
+ runtimeViewer.getTable().setLayoutData(fd);
+
runtimeViewer.setInput(getAllAvailableESBRuntimes());
setControl(com);
}
+ protected void manageRuntimesPressed() {
+ FilteredPreferenceDialog dialog = WorkbenchPreferenceDialog
+ .createDialogOn(manageRuntimes.getShell(), "org.jboss.tools.esb.project.runtime.preference");
+ dialog.open();
+ }
+
public boolean finish() {
IStructuredSelection selection = (StructuredSelection)runtimeViewer.getSelection();
Object obj = selection.getFirstElement();
15 years
JBoss Tools SVN: r19445 - branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-12-17 13:44:36 -0500 (Thu, 17 Dec 2009)
New Revision: 19445
Modified:
branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java
Log:
JBIDE-5496 - annoying esb runtime version unset
Modified: branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java 2009-12-17 18:43:06 UTC (rev 19444)
+++ branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java 2009-12-17 18:44:36 UTC (rev 19445)
@@ -581,8 +581,24 @@
setPageComplete(false);
return;
}
-
+
if (!runtimeExist(homeDir.getValueAsString(), (String)version.getValue(), configuration.getText())) {
+ final Combo vCombo = (Combo)this.version.getEditorControls()[1];
+ String[] vStrings = vCombo.getItems();
+ for( int i = 0; i < vStrings.length; i++ ) {
+ boolean works = runtimeExist(homeDir.getValueAsString(), vStrings[i], configuration.getText());
+ if( works ) {
+ final String newVersion = vStrings[i];
+ final int i2 = i;
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ vCombo.select(i2);
+ version.setValue(newVersion);
+ }
+ });
+ return;
+ }
+ }
setErrorMessage(NLS.bind(JBossESBUIMessages.Label_JBoss_Runtime_Load_Error, version.getValue()));
setPageComplete(false);
return;
15 years
JBoss Tools SVN: r19444 - branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-12-17 13:43:06 -0500 (Thu, 17 Dec 2009)
New Revision: 19444
Modified:
branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java
Log:
Sort the versions so they are in order, and stop allowing the name text to change all the time. UGH.
Modified: branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java 2009-12-17 18:42:09 UTC (rev 19443)
+++ branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/preference/controls/JBossRuntimeListFieldEditor.java 2009-12-17 18:43:06 UTC (rev 19444)
@@ -14,6 +14,8 @@
import java.beans.PropertyChangeListener;
import java.io.File;
import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -510,16 +512,6 @@
*/
public void propertyChange(java.beans.PropertyChangeEvent evt) {
if ("homeDir".equals(evt.getPropertyName())) { //$NON-NLS-1$
- if (name.getValueAsString() == null
- || "".equals(name.getValueAsString().trim()) //$NON-NLS-1$
- || this.getErrorMessage() != null) {
- String homeDirName = homeDir.getValueAsString();
- if (homeDirName != null && !"".equals(homeDirName.trim())) { //$NON-NLS-1$
- File folder = new File(homeDirName);
- homeDirName = folder.getName();
- }
- name.setValue(homeDirName);
- }
updateConfigrations(homeDir.getValueAsString());
}
@@ -617,7 +609,8 @@
for(IProjectFacetVersion version: esbfacet.getVersions()){
versions.add(version.getVersionString());
}
-
+ Collections.sort(versions);
+ Collections.reverse(versions);
return versions;
}
15 years
JBoss Tools SVN: r19443 - branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-12-17 13:42:09 -0500 (Thu, 17 Dec 2009)
New Revision: 19443
Modified:
branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/JBossESBRuntimeContainerPage.java
Log:
JBIDE-5495 - NPE if non-jbt servers are in the workspace.
Modified: branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/JBossESBRuntimeContainerPage.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/JBossESBRuntimeContainerPage.java 2009-12-17 18:40:45 UTC (rev 19442)
+++ branches/jbosstools-3.1.0.RC1/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/JBossESBRuntimeContainerPage.java 2009-12-17 18:42:09 UTC (rev 19443)
@@ -170,7 +170,8 @@
String runtimeType = ((IRuntime)element).getRuntimeType().getId();
if(location == null) return false;
IJBossServerRuntime jbossRuntime = (IJBossServerRuntime)((IRuntime)element).loadAdapter(IJBossServerRuntime.class, new NullProgressMonitor());
-
+ if( jbossRuntime == null )
+ return false;
return JBossRuntimeManager.isValidESBServer(location.toOSString(), runtimeType, jbossRuntime.getJBossConfiguration());
}
return true;
15 years
JBoss Tools SVN: r19442 - branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-12-17 13:40:45 -0500 (Thu, 17 Dec 2009)
New Revision: 19442
Modified:
branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/JMXPoller.java
Log:
JBIDE-5267 - timeout expire behaviour is to pass
Modified: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/JMXPoller.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/JMXPoller.java 2009-12-17 18:30:12 UTC (rev 19441)
+++ branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/extensions/polling/JMXPoller.java 2009-12-17 18:40:45 UTC (rev 19442)
@@ -242,7 +242,7 @@
}
public int getTimeoutBehavior() {
- return TIMEOUT_BEHAVIOR_IGNORE;
+ return TIMEOUT_BEHAVIOR_SUCCEED;
}
private void log(IStatus s) {
15 years
JBoss Tools SVN: r19441 - in branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools: src/org/jboss/ide/eclipse/archives/webtools and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-12-17 13:30:12 -0500 (Thu, 17 Dec 2009)
New Revision: 19441
Added:
branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/SharedImages.java
branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/vcf/FilesetVCLabelProvider.java
Modified:
branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/plugin.xml
branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/IntegrationPlugin.java
branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetReferenceWizardFragment.java
Log:
Beautify filesets in module assembly page
Modified: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/plugin.xml
===================================================================
--- branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/plugin.xml 2009-12-17 18:25:16 UTC (rev 19440)
+++ branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/plugin.xml 2009-12-17 18:30:12 UTC (rev 19441)
@@ -184,9 +184,16 @@
point="org.jboss.ide.eclipse.as.wtp.ui.referenceWizardFragment">
<referenceFragment
class="org.jboss.ide.eclipse.archives.webtools.ui.FilesetReferenceWizardFragment"
- icon="icons/multiple_files.gif"
+ icon="$nl$/icons/multiple_files.gif"
id="org.jboss.ide.eclipse.archives.webtools.FilesetReferenceWizardFragment"
name="Fileset">
</referenceFragment>
</extension>
+ <extension
+ point="org.jboss.ide.eclipse.as.wtp.ui.virtualComponentLabelProvider">
+ <provider
+ class="org.jboss.ide.eclipse.archives.webtools.filesets.vcf.FilesetVCLabelProvider"
+ weight="5">
+ </provider>
+ </extension>
</plugin>
Modified: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/IntegrationPlugin.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/IntegrationPlugin.java 2009-12-17 18:25:16 UTC (rev 19440)
+++ branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/IntegrationPlugin.java 2009-12-17 18:30:12 UTC (rev 19441)
@@ -49,8 +49,9 @@
* @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
+ SharedImages.instance().cleanup();
+ UnitedServerListenerManager.getDefault().removeListener(NewServerFilesetHandler.getDefault());
plugin = null;
- UnitedServerListenerManager.getDefault().removeListener(NewServerFilesetHandler.getDefault());
super.stop(context);
}
Added: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/SharedImages.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/SharedImages.java (rev 0)
+++ branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/SharedImages.java 2009-12-17 18:30:12 UTC (rev 19441)
@@ -0,0 +1,72 @@
+package org.jboss.ide.eclipse.archives.webtools;
+
+import java.util.Hashtable;
+import java.util.Iterator;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.swt.graphics.Image;
+import org.osgi.framework.Bundle;
+
+public class SharedImages {
+ private static SharedImages instance;
+ public static final String FILESET_IMAGE = "multiple_files"; //$NON-NLS-1$
+
+ private Hashtable<String, Object> images, descriptors;
+
+ private SharedImages () {
+ instance = this;
+ images = new Hashtable<String, Object>();
+ descriptors = new Hashtable<String, Object>();
+ Bundle pluginBundle = IntegrationPlugin.getDefault().getBundle();
+
+ descriptors.put(FILESET_IMAGE, createImageDescriptor(pluginBundle, "/icons/multiple_files.gif")); //$NON-NLS-1$
+ Iterator<String> iter = descriptors.keySet().iterator();
+ while (iter.hasNext()) {
+ String key = iter.next();
+ ImageDescriptor descriptor = descriptor(key);
+ images.put(key, descriptor.createImage());
+ }
+ }
+
+ private ImageDescriptor createImageDescriptor (Bundle pluginBundle, String relativePath) {
+ return ImageDescriptor.createFromURL(pluginBundle.getEntry(relativePath));
+ }
+
+ public static SharedImages instance() {
+ if (instance == null)
+ instance = new SharedImages();
+ return instance;
+ }
+
+ public static Image getImage(String key) {
+ return instance().image(key);
+ }
+
+ public static ImageDescriptor getImageDescriptor(String key) {
+ return instance().descriptor(key);
+ }
+
+ public Image image(String key) {
+ return (Image) images.get(key);
+ }
+
+ public ImageDescriptor descriptor(String key) {
+ return (ImageDescriptor) descriptors.get(key);
+ }
+
+ public void cleanup() {
+ Iterator<String> iter = images.keySet().iterator();
+ while (iter.hasNext()) {
+ Image image = (Image) images.get(iter.next());
+ image.dispose();
+ }
+ images = null;
+ instance = null;
+ }
+
+ protected void finalize() throws Throwable {
+ cleanup();
+ super.finalize();
+ }
+
+}
Added: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/vcf/FilesetVCLabelProvider.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/vcf/FilesetVCLabelProvider.java (rev 0)
+++ branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/vcf/FilesetVCLabelProvider.java 2009-12-17 18:30:12 UTC (rev 19441)
@@ -0,0 +1,31 @@
+package org.jboss.ide.eclipse.archives.webtools.filesets.vcf;
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.jboss.ide.eclipse.archives.webtools.SharedImages;
+import org.jboss.ide.eclipse.as.wtp.ui.propertypage.IVirtualComponentLabelProvider;
+
+public class FilesetVCLabelProvider implements IVirtualComponentLabelProvider {
+
+ public FilesetVCLabelProvider() {
+ }
+
+ public boolean canHandle(IVirtualComponent component) {
+ return component instanceof WorkspaceFilesetVirtualComponent;
+ }
+
+ public Image getSourceImage(IVirtualComponent component) {
+ return SharedImages.getImage(SharedImages.FILESET_IMAGE);
+ }
+
+ public String getSourceText(IVirtualComponent component) {
+ WorkspaceFilesetVirtualComponent fileset = (WorkspaceFilesetVirtualComponent)component;
+ String base = fileset.getRootFolderPath();
+ if( fileset.getIncludes() != null && !fileset.getIncludes().equals("")) //$NON-NLS-1$
+ base += " [" + fileset.getIncludes() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+ if( fileset.getExcludes() != null && !fileset.getExcludes().equals("")) //$NON-NLS-1$
+ base += " [" + fileset.getExcludes() + "]"; //$NON-NLS-1$ //$NON-NLS-2$
+ return base;
+ }
+
+}
Modified: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetReferenceWizardFragment.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetReferenceWizardFragment.java 2009-12-17 18:25:16 UTC (rev 19440)
+++ branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/ui/FilesetReferenceWizardFragment.java 2009-12-17 18:30:12 UTC (rev 19441)
@@ -25,9 +25,10 @@
import org.eclipse.wst.server.ui.wizard.IWizardHandle;
import org.eclipse.wst.server.ui.wizard.WizardFragment;
import org.jboss.ide.eclipse.archives.webtools.filesets.vcf.WorkspaceFilesetVirtualComponent;
+import org.jboss.ide.eclipse.as.wtp.ui.propertypage.IReferenceEditor;
import org.jboss.ide.eclipse.as.wtp.ui.propertypage.NewReferenceWizard;
-public class FilesetReferenceWizardFragment extends WizardFragment {
+public class FilesetReferenceWizardFragment extends WizardFragment implements IReferenceEditor {
public boolean hasComposite() {
return true;
}
@@ -41,7 +42,7 @@
private String includes, excludes, folder;
public Composite createComposite(Composite parent, IWizardHandle handle) {
hasEntered = true;
- handle.setTitle("Add a fileset"); //$NON-NLS-1$
+ handle.setTitle("Add a fileset reference"); //$NON-NLS-1$
handle.setDescription("This will let you select a root folder and some matching patterns"); //$NON-NLS-1$
Composite child = new Composite(parent, SWT.NONE);
@@ -67,6 +68,11 @@
incText.addModifyListener(listener);
excText.addModifyListener(listener);
textModified();
+ if( original != null ) {
+ rootText.setText(original.getRootFolderPath());
+ incText.setText(original.getIncludes());
+ excText.setText(original.getExcludes());
+ }
return child;
}
@@ -143,4 +149,11 @@
return vc;
}
+ private WorkspaceFilesetVirtualComponent original;
+ public boolean canEdit(IVirtualComponent vc) {
+ if( vc instanceof WorkspaceFilesetVirtualComponent)
+ original = (WorkspaceFilesetVirtualComponent)vc;
+ return original != null;
+ }
+
}
15 years
JBoss Tools SVN: r19440 - in branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui: schema and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-12-17 13:25:16 -0500 (Thu, 17 Dec 2009)
New Revision: 19440
Added:
branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/schema/virtualComponentLabelProvider.exsd
branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IVirtualComponentLabelProvider.java
Modified:
branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/plugin.xml
branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ComponentDependencyContentProvider.java
branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/DependencyPageExtensionManager.java
Log:
Merging UI changes to allow customization of module assembly types image / text
Modified: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/plugin.xml
===================================================================
--- branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/plugin.xml 2009-12-17 18:22:10 UTC (rev 19439)
+++ branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/plugin.xml 2009-12-17 18:25:16 UTC (rev 19440)
@@ -3,6 +3,7 @@
<plugin>
<extension-point id="moduleDependencyPropertyPage" name="moduleDependencyPropertyPage" schema="schema/moduleDependencyPropertyPage.exsd"/>
<extension-point id="referenceWizardFragment" name="referenceWizardFragment" schema="schema/referenceWizardFragment.exsd"/>
+ <extension-point id="virtualComponentLabelProvider" name="virtualComponentLabelProvider" schema="schema/virtualComponentLabelProvider.exsd"/>
<extension point="org.eclipse.ui.propertyPages">
Added: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/schema/virtualComponentLabelProvider.exsd
===================================================================
--- branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/schema/virtualComponentLabelProvider.exsd (rev 0)
+++ branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/schema/virtualComponentLabelProvider.exsd 2009-12-17 18:25:16 UTC (rev 19440)
@@ -0,0 +1,109 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.jboss.ide.eclipse.as.wtp.ui" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.jboss.ide.eclipse.as.wtp.ui" id="VirtualComponentLabelProvider" name="VirtualComponentLabelProvider"/>
+ </appinfo>
+ <documentation>
+ [Enter description of this extension point.]
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="1" maxOccurs="unbounded">
+ <element ref="provider"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="provider">
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.jboss.ide.eclipse.as.wtp.ui.propertypage.IVirtualComponentLabelProvider"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ <attribute name="weight" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ [Enter the first release in which this extension point appears.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter extension point usage example here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ [Enter information about supplied implementation of this extension point.]
+ </documentation>
+ </annotation>
+
+
+</schema>
Modified: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ComponentDependencyContentProvider.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ComponentDependencyContentProvider.java 2009-12-17 18:22:10 UTC (rev 19439)
+++ branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ComponentDependencyContentProvider.java 2009-12-17 18:25:16 UTC (rev 19440)
@@ -49,10 +49,11 @@
private DecoratingLabelProvider decProvider = new DecoratingLabelProvider(
new WorkbenchLabelProvider(), PlatformUI.getWorkbench().
getDecoratorManager().getLabelDecorator());
-
+ private IVirtualComponentLabelProvider[] delegates;
public ComponentDependencyContentProvider(AddModuleDependenciesPropertiesPage addModuleDependenciesPropertiesPage) {
super();
decProvider.addListener(addModuleDependenciesPropertiesPage);
+ delegates = DependencyPageExtensionManager.loadDelegates();
}
public void setRuntimePaths(HashMap<IVirtualComponent, String> paths) {
@@ -81,10 +82,7 @@
if (columnIndex == 0)
return WTPOveridePlugin.getInstance().getImage("jar_obj");
else
- if(((IVirtualComponent)element).isBinary())
- return WTPOveridePlugin.getInstance().getImage("jar_obj");
- else return decProvider.getImage(((IVirtualComponent)element).getProject());
- //return ModuleCoreUIPlugin.getInstance().getImage("prj_obj");
+ return handleSourceImage((IVirtualComponent)element);
}
if (element instanceof IProject){
return decProvider.getImage(element);
@@ -122,16 +120,37 @@
return null;
}
- private String handleSourceText(IVirtualComponent comp) {
- if( comp.isBinary() && comp instanceof VirtualArchiveComponent) {
- IPath p = ((VirtualArchiveComponent)comp).getWorkspaceRelativePath();
+
+
+ private String handleSourceText(IVirtualComponent component) {
+ if( delegates != null ) {
+ for( int i = 0; i < delegates.length; i++ )
+ if( delegates[i].canHandle(component))
+ return delegates[i].getSourceText(component);
+ }
+
+ // default impl
+ if( component.isBinary() && component instanceof VirtualArchiveComponent) {
+ IPath p = ((VirtualArchiveComponent)component).getWorkspaceRelativePath();
if( p == null )
- p = new Path(((VirtualArchiveComponent)comp).getUnderlyingDiskFile().getAbsolutePath());
+ p = new Path(((VirtualArchiveComponent)component).getUnderlyingDiskFile().getAbsolutePath());
return p.toString();
}
- return comp.getProject().getName();
+ return component.getProject().getName();
}
+ private Image handleSourceImage(IVirtualComponent component) {
+ if( delegates != null ) {
+ for( int i = 0; i < delegates.length; i++ )
+ if( delegates[i].canHandle(component))
+ return delegates[i].getSourceImage(component);
+ }
+
+ // default impl
+ if(component.isBinary())
+ return WTPOveridePlugin.getInstance().getImage("jar_obj");
+ else return decProvider.getImage(component.getProject());
+ }
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
Modified: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/DependencyPageExtensionManager.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/DependencyPageExtensionManager.java 2009-12-17 18:22:10 UTC (rev 19439)
+++ branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/DependencyPageExtensionManager.java 2009-12-17 18:25:16 UTC (rev 19440)
@@ -1,8 +1,12 @@
package org.jboss.ide.eclipse.as.wtp.ui.propertypage;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
@@ -118,4 +122,38 @@
}
}
}
+
+
+ public static IVirtualComponentLabelProvider[] loadDelegates() {
+ IExtensionRegistry registry = Platform.getExtensionRegistry();
+ IConfigurationElement[] cf = registry.getConfigurationElementsFor(
+ WTPOveridePlugin.PLUGIN_ID, "virtualComponentLabelProvider"); //$NON-NLS-1$
+ List<IConfigurationElement> list = Arrays.asList(cf);
+ Comparator c = new Comparator<IConfigurationElement>() {
+ public int compare(IConfigurationElement o1,
+ IConfigurationElement o2) {
+ String o1String, o2String;
+ int o1int, o2int;
+ o1String=o1.getAttribute("weight");
+ o2String=o2.getAttribute("weight");
+ o1int = Integer.parseInt(o1String);
+ o2int = Integer.parseInt(o1String);
+ return o1int-o2int;
+ }
+ };
+ Collections.sort(list, c);
+ ArrayList<IVirtualComponentLabelProvider> retList = new ArrayList<IVirtualComponentLabelProvider>();
+ Iterator<IConfigurationElement> i = list.iterator();
+ while(i.hasNext()) {
+ try {
+ retList.add((IVirtualComponentLabelProvider)i.next().createExecutableExtension("class"));
+ } catch( CoreException ce) {
+ // log
+ }
+ }
+ return (IVirtualComponentLabelProvider[]) retList
+ .toArray(new IVirtualComponentLabelProvider[retList.size()]);
+ }
+
+
}
Added: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IVirtualComponentLabelProvider.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IVirtualComponentLabelProvider.java (rev 0)
+++ branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/IVirtualComponentLabelProvider.java 2009-12-17 18:25:16 UTC (rev 19440)
@@ -0,0 +1,10 @@
+package org.jboss.ide.eclipse.as.wtp.ui.propertypage;
+
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+
+public interface IVirtualComponentLabelProvider {
+ public boolean canHandle(IVirtualComponent component);
+ public String getSourceText(IVirtualComponent component);
+ public Image getSourceImage(IVirtualComponent component);
+}
15 years
JBoss Tools SVN: r19439 - in branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui: src/org/jboss/ide/eclipse/as/wtp/ui and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-12-17 13:22:10 -0500 (Thu, 17 Dec 2009)
New Revision: 19439
Added:
branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/icons/folder.gif
Modified:
branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/Messages.java
branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/WTPOveridePlugin.java
branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/messages.properties
branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/AddModuleDependenciesPropertiesPage.java
branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ComponentDependencyContentProvider.java
Log:
Merging in UI changes to beautify module assembly page
Added: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/icons/folder.gif
===================================================================
(Binary files differ)
Property changes on: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/icons/folder.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/Messages.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/Messages.java 2009-12-17 18:17:51 UTC (rev 19438)
+++ branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/Messages.java 2009-12-17 18:22:10 UTC (rev 19439)
@@ -4,6 +4,7 @@
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.jboss.ide.eclipse.as.wtp.ui.messages"; //$NON-NLS-1$
+ public static String ModuleDependencyDescription;
public static String AddModuleDependenciesPropertiesPage_AddProjectButton;
public static String AddModuleDependenciesPropertiesPage_DeployPathColumn;
public static String AddModuleDependenciesPropertiesPage_RemoveSelectedButton;
Modified: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/WTPOveridePlugin.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/WTPOveridePlugin.java 2009-12-17 18:17:51 UTC (rev 19438)
+++ branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/WTPOveridePlugin.java 2009-12-17 18:22:10 UTC (rev 19439)
@@ -1,10 +1,19 @@
package org.jboss.ide.eclipse.as.wtp.ui;
+import java.net.MalformedURLException;
+import java.net.URL;
+
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
/**
@@ -14,10 +23,19 @@
// The plug-in ID
public static final String PLUGIN_ID = "org.jboss.ide.eclipse.as.wtp.ui"; //$NON-NLS-1$
-
+ public static final String[] ICON_DIRS = new String[]{"icons/full/obj16", //$NON-NLS-1$
+ "icons/full/cview16", //$NON-NLS-1$
+ "icons/full/ctool16", //$NON-NLS-1$
+ "icons/full/clcl16", //$NON-NLS-1$
+ "icons/full/ovr16", //$NON-NLS-1$
+ "icons/full/extra", //$NON-NLS-1$
+ "icons/full/wizban", //$NON-NLS-1$
+ "icons", //$NON-NLS-1$
+ ""}; //$NON-NLS-1$
+
// The shared instance
private static WTPOveridePlugin plugin;
-
+
/**
* The constructor
*/
@@ -43,11 +61,58 @@
}
/**
+ * Get a .gif from the image registry.
+ */
+ public Image getImage(String key) {
+ ImageRegistry imageRegistry = getImageRegistry();
+ Image image = imageRegistry.get(key);
+ if (image == null || image.isDisposed()) {
+ ImageDescriptor descriptor = getImageDescriptor(key);
+ if (descriptor != null) {
+ image = descriptor.createImage();
+ imageRegistry.put(key, image);
+ }
+ }
+ return image;
+ }
+
+ /**
+ * This gets a .gif from the icons folder.
+ */
+ public ImageDescriptor getImageDescriptor(String key) {
+ ImageDescriptor imageDescriptor = null;
+ URL gifImageURL = getImageURL(key,getBundle());
+ if (gifImageURL != null)
+ imageDescriptor = ImageDescriptor.createFromURL(gifImageURL);
+ return imageDescriptor;
+ }
+
+ /**
+ * This gets a .gif from the icons folder.
+ */
+ public URL getImageURL(String key, Bundle bundle) {
+ String gif = "/" + key + ".gif"; //$NON-NLS-1$ //$NON-NLS-2$
+ IPath path = null;
+ for (int i = 0; i < ICON_DIRS.length; i++) {
+ path = new Path(ICON_DIRS[i]).append(gif);
+ if (Platform.find(bundle,path) == null)
+ continue;
+ try {
+ return new URL( bundle.getEntry("/"), path.toString()); //$NON-NLS-1$
+ } catch (MalformedURLException exception) {
+ logError(exception);
+ continue;
+ }
+ }
+ return null;
+ }
+
+ /**
* Returns the shared instance
*
* @return the shared instance
*/
- public static WTPOveridePlugin getDefault() {
+ public static WTPOveridePlugin getInstance() {
return plugin;
}
@@ -57,7 +122,7 @@
public static void log(String message, Exception e) {
IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, message, e);
- getDefault().getLog().log(status);
+ getInstance().getLog().log(status);
}
public static IStatus createStatus(int severity, int aCode,
String aMessage, Throwable exception) {
Modified: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/messages.properties
===================================================================
--- branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/messages.properties 2009-12-17 18:17:51 UTC (rev 19438)
+++ branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/messages.properties 2009-12-17 18:22:10 UTC (rev 19439)
@@ -1,3 +1,4 @@
+ModuleDependencyDescription=Adjust the project's module assembly structure
AddModuleDependenciesPropertiesPage_AddProjectButton=Add Project...
AddModuleDependenciesPropertiesPage_DeployPathColumn=Deploy Path
AddModuleDependenciesPropertiesPage_RemoveSelectedButton=Remove selected...
Modified: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/AddModuleDependenciesPropertiesPage.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/AddModuleDependenciesPropertiesPage.java 2009-12-17 18:17:51 UTC (rev 19438)
+++ branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/AddModuleDependenciesPropertiesPage.java 2009-12-17 18:22:10 UTC (rev 19439)
@@ -35,9 +35,11 @@
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.ICellModifier;
+import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.LabelProviderChangedEvent;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.TableViewer;
@@ -85,7 +87,7 @@
import org.jboss.ide.eclipse.as.wtp.ui.WTPOveridePlugin;
public class AddModuleDependenciesPropertiesPage implements Listener,
- IModuleDependenciesControl {
+ IModuleDependenciesControl, ILabelProviderListener {
private static final String DEPLOY_PATH_PROPERTY = new Integer(0).toString();
private static final String SOURCE_PROPERTY = new Integer(1).toString();
@@ -142,7 +144,7 @@
composite.setLayout(layout);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
ModuleAssemblyRootPage.createDescriptionComposite(composite,
- "TODO Change this: Create and change packaging structure for this project ");
+ Messages.ModuleDependencyDescription);
createListGroup(composite);
refresh();
Dialog.applyDialogFont(parent);
@@ -244,7 +246,7 @@
* Subclasses should over-ride this and extend the class
*/
protected ComponentDependencyContentProvider createProvider() {
- return new ComponentDependencyContentProvider();
+ return new ComponentDependencyContentProvider(this);
}
/*
@@ -970,4 +972,10 @@
return uriMapName;
}
+
+ public void labelProviderChanged(LabelProviderChangedEvent event) {
+ if(!availableComponentsViewer.getTable().isDisposed())
+ availableComponentsViewer.refresh(true);
+ }
+
}
Modified: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ComponentDependencyContentProvider.java
===================================================================
--- branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ComponentDependencyContentProvider.java 2009-12-17 18:17:51 UTC (rev 19438)
+++ branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.wtp.ui/src/org/jboss/ide/eclipse/as/wtp/ui/propertypage/ComponentDependencyContentProvider.java 2009-12-17 18:22:10 UTC (rev 19439)
@@ -18,14 +18,17 @@
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.swt.graphics.Image;
-import org.eclipse.wst.common.componentcore.internal.ComponentResource;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.wst.common.componentcore.internal.resources.VirtualArchiveComponent;
import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
+import org.jboss.ide.eclipse.as.wtp.ui.WTPOveridePlugin;
import org.jboss.ide.eclipse.as.wtp.ui.propertypage.AddModuleDependenciesPropertiesPage.ComponentResourceProxy;
@@ -43,8 +46,13 @@
private HashMap<IVirtualComponent, String> runtimePaths;
private ArrayList<ComponentResourceProxy> resourceMappings;
- public ComponentDependencyContentProvider() {
+ private DecoratingLabelProvider decProvider = new DecoratingLabelProvider(
+ new WorkbenchLabelProvider(), PlatformUI.getWorkbench().
+ getDecoratorManager().getLabelDecorator());
+
+ public ComponentDependencyContentProvider(AddModuleDependenciesPropertiesPage addModuleDependenciesPropertiesPage) {
super();
+ decProvider.addListener(addModuleDependenciesPropertiesPage);
}
public void setRuntimePaths(HashMap<IVirtualComponent, String> paths) {
@@ -66,6 +74,21 @@
}
public Image getColumnImage(Object element, int columnIndex) {
+ if( element instanceof ComponentResourceProxy) {
+ return WTPOveridePlugin.getInstance().getImage("folder");
+ }
+ if (element instanceof IVirtualComponent) {
+ if (columnIndex == 0)
+ return WTPOveridePlugin.getInstance().getImage("jar_obj");
+ else
+ if(((IVirtualComponent)element).isBinary())
+ return WTPOveridePlugin.getInstance().getImage("jar_obj");
+ else return decProvider.getImage(((IVirtualComponent)element).getProject());
+ //return ModuleCoreUIPlugin.getInstance().getImage("prj_obj");
+ }
+ if (element instanceof IProject){
+ return decProvider.getImage(element);
+ }
return null;
}
@@ -84,13 +107,7 @@
}
return runtimePaths.get(element);
} else if (columnIndex == 1) {
- if( comp.isBinary() && comp instanceof VirtualArchiveComponent) {
- IPath p = ((VirtualArchiveComponent)comp).getWorkspaceRelativePath();
- if( p == null )
- p = new Path(((VirtualArchiveComponent)comp).getUnderlyingDiskFile().getAbsolutePath());
- return p.toString();
- }
- return comp.getName();
+ return handleSourceText(comp);
}
} else if (element instanceof IProject){
if (columnIndex == 0) {
@@ -105,6 +122,17 @@
return null;
}
+ private String handleSourceText(IVirtualComponent comp) {
+ if( comp.isBinary() && comp instanceof VirtualArchiveComponent) {
+ IPath p = ((VirtualArchiveComponent)comp).getWorkspaceRelativePath();
+ if( p == null )
+ p = new Path(((VirtualArchiveComponent)comp).getUnderlyingDiskFile().getAbsolutePath());
+ return p.toString();
+ }
+ return comp.getProject().getName();
+ }
+
+
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
}
}
15 years
JBoss Tools SVN: r19438 - trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2009-12-17 13:17:51 -0500 (Thu, 17 Dec 2009)
New Revision: 19438
Modified:
trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
Log:
https://jira.jboss.org/jira/browse/JBIDE-5489
Modified: trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2009-12-17 18:14:12 UTC (rev 19437)
+++ trunk/esb/plugins/org.jboss.tools.esb.core/resources/meta/esb-actions.meta 2009-12-17 18:17:51 UTC (rev 19438)
@@ -148,7 +148,15 @@
<Editor name="Uneditable"/>
</XModelAttribute>
<XModelAttribute PROPERTIES="pre=true;category=general;save=always"
- name="command" xmlname="command"/>
+ name="command" xmlname="command">
+ <Constraint loader="ListString">
+ <value/>
+ <value name="NewProcessInstanceCommand"/>
+ <value name="StartProcessCommand"/>
+ <value name="CancelProcessInstanceCommand"/>
+ </Constraint>
+ <Editor name="ListString"/>
+ </XModelAttribute>
<XModelAttribute PROPERTIES="pre=true;category=general"
name="process definition name" xmlname="processdefinition"/>
<XModelAttribute PROPERTIES="pre=true;category=general"
15 years
JBoss Tools SVN: r19437 - branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.ui/icons.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2009-12-17 13:14:12 -0500 (Thu, 17 Dec 2009)
New Revision: 19437
Modified:
branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.ui/icons/jboss.gif
Log:
JBIDE-5329 - replaced gif never committed
Modified: branches/jbosstools-3.1.0.RC1/as/plugins/org.jboss.ide.eclipse.as.ui/icons/jboss.gif
===================================================================
(Binary files differ)
15 years