JBoss Tools SVN: r23857 - trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages.
by jbosstools-commits@lists.jboss.org
Author: dennyxu
Date: 2010-08-02 01:28:57 -0400 (Mon, 02 Aug 2010)
New Revision: 23857
Modified:
trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
Log:
JBIDE-6698: ESB Project Wizard: source folder in 'Java' and 'Install ESB Facet' views are not synced
Modified: trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2010-08-02 01:52:08 UTC (rev 23856)
+++ trunk/esb/plugins/org.jboss.tools.esb.project.ui/src/org/jboss/tools/esb/project/ui/wizards/pages/ESBFacetInstallationPage.java 2010-08-02 05:28:57 UTC (rev 23857)
@@ -68,8 +68,6 @@
public class ESBFacetInstallationPage extends AbstractFacetWizardPage implements IFacetWizardPage, IJBossESBFacetDataModelProperties {
- private Label configFolderLabel;
- private Text configFolder;
private Label contextRootLabel;
private Text contentFolder;
private IDataModel model;
@@ -178,35 +176,9 @@
}
});
- configFolderLabel = new Label(prjGroup, SWT.NONE);
- configFolderLabel.setText(JBossESBUIMessages.ESBFacetInstallationPage_Label_Source_Directory);
- configFolderLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
- configFolder = new Text(prjGroup, SWT.BORDER);
- configFolder.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- configFolder.setData("label", configFolderLabel); //$NON-NLS-1$
- configFolder.setText(JBossESBUIMessages.ESBFacetInstallationPage_Default_SRC_Folder);
- configFolder.addModifyListener(new ModifyListener(){
- public void modifyText(ModifyEvent e){
- String srcFolder = configFolder.getText();
- if(srcFolder != null && !srcFolder.equals("")){ //$NON-NLS-1$
- model.setProperty(ESB_SOURCE_FOLDER, srcFolder);
- setConfigFolder(srcFolder);
- }
- changePageStatus();
- }
-
- });
}
- private void setConfigFolder(String folderName){
- JavaFacetInstallConfig cfg = findJavaFacetInstallConfig();
- if(cfg != null){
- cfg.setSourceFolder(new Path(folderName));
- }
- }
-
private IFacetedProjectWorkingCopy getFacetedProjectWorkingCopy(){
Object obj = model.getProperty(IFacetDataModelProperties.FACETED_PROJECT_WORKING_COPY);
if(obj instanceof IFacetedProjectWorkingCopy){
@@ -543,11 +515,12 @@
hasValidContentFolder = false;
setPageComplete(isPageComplete());
}
- else if(!validFolderName(configFolder.getText())){
- setErrorMessage(JBossESBUIMessages.ESBFacetInstallationPage_Error_Message_Specify_Source_Folder);
- hasValidSrc = false;
- setPageComplete(isPageComplete());
- }else if(btnUserSupplied.getSelection() && !hasRuntime){
+// else if(!validFolderName(configFolder.getText())){
+// setErrorMessage(JBossESBUIMessages.ESBFacetInstallationPage_Error_Message_Specify_Source_Folder);
+// hasValidSrc = false;
+// setPageComplete(isPageComplete());
+// }
+ else if(btnUserSupplied.getSelection() && !hasRuntime){
setErrorMessage(JBossESBUIMessages.ESBFacetInstallationPage_Error_Message_Specify_ESB_Runtime);
setPageComplete(isPageComplete());
}else if(btnServerSupplied.getSelection() && !checkServerSuppliedESBRuntime()){
14 years, 5 months
JBoss Tools SVN: r23856 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-08-01 21:52:08 -0400 (Sun, 01 Aug 2010)
New Revision: 23856
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreActionDelegate.java
Log:
https://jira.jboss.org/browse/JBIDE-6707 Add "Explore" option on the whole server, not only on a specific resource
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreActionDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreActionDelegate.java 2010-08-01 21:35:43 UTC (rev 23855)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreActionDelegate.java 2010-08-02 01:52:08 UTC (rev 23856)
@@ -28,7 +28,7 @@
/* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
*/
- @Override
+
public void run(IAction action) {
if (fCurrentSelection instanceof IStructuredSelection) {
IStructuredSelection structuredSelection = (IStructuredSelection) fCurrentSelection;
@@ -46,7 +46,7 @@
/* (non-Javadoc)
* @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
*/
- @Override
+
public void selectionChanged(IAction action, ISelection selection) {
fCurrentSelection= selection;
}
@@ -54,7 +54,7 @@
/* (non-Javadoc)
* @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
*/
- @Override
+
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
}
14 years, 5 months
JBoss Tools SVN: r23855 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui: jbossui/org/jboss/ide/eclipse/as/ui/actions and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2010-08-01 17:35:43 -0400 (Sun, 01 Aug 2010)
New Revision: 23855
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreActionDelegate.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerActionProvider.java
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
Log:
https://jira.jboss.org/browse/JBIDE-6707 Add "Explore" option on the whole server, not only on a specific resource
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreActionDelegate.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreActionDelegate.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreActionDelegate.java 2010-08-01 21:35:43 UTC (rev 23855)
@@ -0,0 +1,62 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2009 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are 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:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.ide.eclipse.as.ui.actions;
+
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.IObjectActionDelegate;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.wst.server.core.IServer;
+
+/**
+ * @author Snjeza
+ *
+ */
+public class ExploreActionDelegate implements IObjectActionDelegate {
+
+ private ISelection fCurrentSelection;
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+ */
+ @Override
+ public void run(IAction action) {
+ if (fCurrentSelection instanceof IStructuredSelection) {
+ IStructuredSelection structuredSelection = (IStructuredSelection) fCurrentSelection;
+ Object object = structuredSelection.getFirstElement();
+ if (object instanceof IServer) {
+ IServer server = (IServer) object;
+ String deployDirectory = ExploreUtils.getDeployDirectory(server);
+ if (deployDirectory != null && deployDirectory.length() > 0) {
+ ExploreUtils.explore(deployDirectory);
+ }
+ }
+ }
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+ */
+ @Override
+ public void selectionChanged(IAction action, ISelection selection) {
+ fCurrentSelection= selection;
+ }
+
+ /* (non-Javadoc)
+ * @see org.eclipse.ui.IObjectActionDelegate#setActivePart(org.eclipse.jface.action.IAction, org.eclipse.ui.IWorkbenchPart)
+ */
+ @Override
+ public void setActivePart(IAction action, IWorkbenchPart targetPart) {
+
+ }
+
+}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java 2010-07-31 05:05:37 UTC (rev 23854)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/actions/ExploreUtils.java 2010-08-01 21:35:43 UTC (rev 23855)
@@ -14,8 +14,10 @@
import java.io.IOException;
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.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.IServerWorkingCopy;
@@ -95,7 +97,7 @@
public static boolean canExplore(IServer server) {
String deployDirectory = ExploreUtils.getDeployDirectory(server);
- if (deployDirectory == null || deployDirectory.length() <= 0) {
+ if (deployDirectory == null || deployDirectory.length() <= 0 && new File(deployDirectory).exists()) {
return false;
}
if (ExploreUtils.getExploreCommand() == null) {
@@ -122,8 +124,15 @@
int len = exploreFolderCommandArray.length;
exploreFolderCommandArray[len-1] = name;
Runtime.getRuntime().exec(exploreFolderCommandArray);
+ } else if (Platform.getOS().equals(Platform.OS_WIN32)) {
+ command = command.replace(ExploreUtils.PATH, name);
+ Runtime.getRuntime().exec(command);
} else {
command = command.replace(ExploreUtils.PATH, name);
+ if (JBossServerUIPlugin.getDefault().isDebugging()) {
+ IStatus status = new Status(IStatus.WARNING, JBossServerUIPlugin.PLUGIN_ID, "command=" + command, null); //$NON-NLS-1$
+ JBossServerUIPlugin.getDefault().getLog().log(status);
+ }
Runtime.getRuntime().exec(command);
}
} catch (IOException e) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerActionProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerActionProvider.java 2010-07-31 05:05:37 UTC (rev 23854)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerActionProvider.java 2010-08-01 21:35:43 UTC (rev 23855)
@@ -137,7 +137,7 @@
clipboard = new Clipboard(tableViewer.getTree().getDisplay());
Shell shell = tableViewer.getTree().getShell();
- actions = new Action[6];
+ actions = new Action[5];
// create the start actions
actions[0] = new StartAction(shell, provider, ILaunchManager.DEBUG_MODE);
actions[1] = new StartAction(shell, provider, ILaunchManager.RUN_MODE);
@@ -148,7 +148,7 @@
// create the publish actions
actions[4] = new PublishAction(shell, provider);
- actions[5] = new ExploreAction(shell,provider);
+ //actions[5] = new ExploreAction(shell,provider);
// create the open action
openAction = new OpenAction(provider);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2010-07-31 05:05:37 UTC (rev 23854)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2010-08-01 21:35:43 UTC (rev 23855)
@@ -578,5 +578,31 @@
typeIds="%AllJBossServerTypes">
</runtimeLocator>
</extension>
-
+
+ <extension point="org.eclipse.ui.popupMenus">
+ <objectContribution
+ adaptable="true"
+ id="org.jboss.ide.eclipse.as.ui.actions.exploreAction"
+ objectClass="org.eclipse.wst.server.core.IServer">
+ enablesFor="1"
+ <enablement>
+ <adapt type="org.eclipse.wst.server.core.IServer">
+ <test forcePluginActivation="true"
+ property="org.eclipse.wst.server.ui.serverType"
+ value="org.jboss.ide.eclipse.as*" />
+ </adapt>
+ </enablement>
+
+ <action
+ label="Explore"
+ icon="icons/actions/xpl/explore.gif"
+ class="org.jboss.ide.eclipse.as.ui.actions.ExploreActionDelegate"
+ tooltip="Explore"
+ menubarPath="org.eclipse.wst.server.ui.internal.cnf.controlServerSectionEnd"
+ id="org.jboss.ide.eclipse.as.ui.actions.ExploreAction">
+ </action>
+ </objectContribution>
+
+ </extension>
+
</plugin>
14 years, 5 months