Author: rob.stryker(a)jboss.com
Date: 2010-11-24 04:23:00 -0500 (Wed, 24 Nov 2010)
New Revision: 26871
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleDeploymentPage.java
Log:
JBIDE-7287 trunk
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2010-11-24
09:16:21 UTC (rev 26870)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.java 2010-11-24
09:23:00 UTC (rev 26871)
@@ -202,6 +202,7 @@
public static String EditorCPD_RestoreDefault;
public static String EditorNoRuntimeSelected;
public static String EditorLocalDeployment;
+ public static String EditorRefreshViewer;
public static String ExploreUtils_Action_Text;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2010-11-24
09:16:21 UTC (rev 26870)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2010-11-24
09:23:00 UTC (rev 26871)
@@ -2,7 +2,7 @@
serverName=Server Name
copy=Copy...
delete=Delete...
-directory=Directory:
+directory=Directory\:
wf_BaseNameVersionReplacement=_VERSION_
wf_NameLabel=Name
wf_HomeDirLabel=Home Directory
@@ -28,7 +28,7 @@
JBossRuntimeWizardFragment_DeleteConfigConfirmation=Are you sure you want to delete this
folder? This cannot be undone.
JBossRuntimeWizardFragment_DeleteConfigTitle=Delete Configuration?
JBossRuntimeWizardFragment_MustSelectValidConfig=User must select a valid configuration
-JBossRuntimeWizardFragment_OutputFolderExists=The output folder already exists:
+JBossRuntimeWizardFragment_OutputFolderExists=The output folder already exists\:
swf_Title=Create a new JBoss Server
swf_RuntimeInformation=Runtime Information
swf_Explanation=A JBoss Server manages starting and stopping instances of JBoss. \nIt
manages command line arguments and keeps track of which modules have been deployed.
@@ -42,7 +42,7 @@
swf_NameInUse=Server name already in use
swf_DeployEditorHeading=Default Settings
swf_DeploymentDescriptionLabel=Set the default publish settings for your
deployments.\nSettings can be overridden per-module in the table below.
-swf_DeploymentDescription=This section sets the default deploy folders for your
deployments. To ensure safe and fast file copies, the temporary deploy folder should be on
the same file-system as the main deploy folder.\n\nCustomizations can be made in the table
below on a per-module basis. Blank (uncustomized) modules will continue to use the default
values. Customized paths may be absolute or relative to the server's root directory
(eg: server/default/deploy/custom/folder).\n\nChanges should *not* be made to this page
while the server is running.
+swf_DeploymentDescription=This section sets the default deploy folders for your
deployments. To ensure safe and fast file copies, the temporary deploy folder should be on
the same file-system as the main deploy folder.\n\nCustomizations can be made in the table
below on a per-module basis. Blank (uncustomized) modules will continue to use the default
values. Customized paths may be absolute or relative to the server's root directory
(eg\: server/default/deploy/custom/folder).\n\nChanges should *not* be made to this page
while the server is running.
swf_DeployDirectory=Deploy Directory
swf_TempDeployDirectory=Temporary Deploy Directory
swf_CloneConfiguration=Copy this configuration into workspace metadata
@@ -117,11 +117,11 @@
XPathActionProvider_RemoveCategoryQuestion=Remove Category?
XPathAttribute=Attribute Name\:
XPathDialogs_BlankCategoryError=Category must not be blank
-XPathDialogs_CategoryLabel=Category:
+XPathDialogs_CategoryLabel=Category\:
XPathDialogs_NoElementsMatched=No XML elements matched your search.
XPathDialogs_PreviewButton=Preview
XPathDialogs_SelectServer=Please Select a Server
-XPathDialogs_ServerLabel=Server:
+XPathDialogs_ServerLabel=Server\:
XPathDialogs_XPathDescriptionLabel=An XPath is a way to find a specific XML element
inside an xml file. This dialog will help you create one.
XPathTreeContentProvider_JobName=Loading XPaths
XPathTreeLabelProvider_LoadingLabel=Loading...
@@ -177,6 +177,7 @@
EditorCPD_RestoreDefault=Restore Default
EditorNoRuntimeSelected=No Runtime Selected. Please select a runtime and refresh your
deployment options.
EditorLocalDeployment=Local Deployment
+EditorRefreshViewer=Refresh Table
ExploreUtils_Action_Text=Explore
ExploreUtils_Description=Explore deploy directory
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java 2010-11-24
09:16:21 UTC (rev 26870)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java 2010-11-24
09:23:00 UTC (rev 26871)
@@ -12,7 +12,6 @@
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
-import java.io.ByteArrayOutputStream;
import java.io.File;
import java.util.HashMap;
@@ -43,13 +42,17 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.DirectoryDialog;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.swt.widgets.TreeColumn;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.forms.IFormColors;
+import org.eclipse.ui.forms.events.HyperlinkEvent;
+import org.eclipse.ui.forms.events.IHyperlinkListener;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.forms.widgets.FormToolkit;
+import org.eclipse.ui.forms.widgets.Hyperlink;
import org.eclipse.ui.forms.widgets.Section;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IRuntime;
@@ -67,7 +70,6 @@
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
import
org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader.DeploymentModulePrefs;
import
org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader.DeploymentPreferences;
-import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.ui.Messages;
@@ -615,12 +617,6 @@
publishLocColumn.setWidth(200);
publishTempLocColumn.setWidth(200);
- FormData treeData = new FormData();
- treeData.top = new FormAttachment(0, 5);
- treeData.bottom = new FormAttachment(100, -5);
- treeData.left = new FormAttachment(0, 5);
- treeData.right = new FormAttachment(100, -5);
- viewer.getTree().setLayoutData(treeData);
viewer.setContentProvider(new ModulePageContentProvider());
viewer.setLabelProvider(new ModulePageLabelProvider());
@@ -633,10 +629,36 @@
new TextCellEditor(viewer.getTree()) };
viewer.setCellModifier(new LocalDeploymentCellModifier());
viewer.setCellEditors(editors);
+
+ Link link = new Link(root, SWT.DEFAULT);
+ link.setText("<a>" + Messages.EditorRefreshViewer +
"</a>");
+ link.addSelectionListener(new SelectionListener() {
+ public void widgetSelected(SelectionEvent e) {
+ refreshViewer();
+ }
+ public void widgetDefaultSelected(SelectionEvent e) {
+ }
+ });
+ FormData linkData = new FormData();
+ linkData.bottom = new FormAttachment(100,-5);
+ linkData.left = new FormAttachment(0, 5);
+ link.setLayoutData(linkData);
+
+ FormData treeData = new FormData();
+ treeData.top = new FormAttachment(0, 5);
+ treeData.bottom = new FormAttachment(link, -5);
+ treeData.left = new FormAttachment(0, 5);
+ treeData.right = new FormAttachment(100, -5);
+ viewer.getTree().setLayoutData(treeData);
return root;
}
+ private void refreshViewer() {
+ page.refreshPossibleModules();
+ viewer.setInput(""); // irrelevent
+ }
+
private class LocalDeploymentCellModifier implements ICellModifier {
public boolean canModify(Object element, String property) {
if( property == COLUMN_NAME)
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleDeploymentPage.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleDeploymentPage.java 2010-11-24
09:16:21 UTC (rev 26870)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/ModuleDeploymentPage.java 2010-11-24
09:23:00 UTC (rev 26871)
@@ -79,6 +79,17 @@
public void init(IEditorSite site, IEditorInput input) {
super.init(site, input);
+ refreshPossibleModules();
+ if (input instanceof IServerEditorPartInput) {
+ IServerEditorPartInput sepi = (IServerEditorPartInput) input;
+ server = sepi.getServer();
+ commandManager = ((ServerEditorPartInput) sepi).getServerCommandManager();
+ readOnly = sepi.isServerReadOnly();
+ }
+ helper = new ServerAttributeHelper(server.getOriginal(), server);
+ }
+
+ public void refreshPossibleModules() {
ArrayList<IModule> possibleChildren = new ArrayList<IModule>();
IModule[] modules2 =
org.eclipse.wst.server.core.ServerUtil.getModules(server.getServerType().getRuntimeType().getModuleTypes());
if (modules2 != null) {
@@ -91,20 +102,13 @@
}
}
this.possibleModules = possibleChildren;
- if (input instanceof IServerEditorPartInput) {
- IServerEditorPartInput sepi = (IServerEditorPartInput) input;
- server = sepi.getServer();
- commandManager = ((ServerEditorPartInput) sepi).getServerCommandManager();
- readOnly = sepi.isServerReadOnly();
- }
- helper = new ServerAttributeHelper(server.getOriginal(), server);
-
}
public void createPartControl(Composite parent) {
preferences =
DeploymentPreferenceLoader.loadPreferencesFromServer(server.getOriginal());
ScrolledForm innerContent = createPageStructure(parent);
addDeploymentLocationControls(innerContent.getBody(), null);
+
innerContent.reflow(true);
}