JBoss Tools SVN: r33625 - trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java.
by jbosstools-commits@lists.jboss.org
Author: dgeraskov
Date: 2011-08-05 06:38:33 -0400 (Fri, 05 Aug 2011)
New Revision: 33625
Modified:
trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernatePackageInfoImpl.java
Log:
https://issues.jboss.org/browse/JBIDE-9456
Return package-info.java as resource
Modified: trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernatePackageInfoImpl.java
===================================================================
--- trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernatePackageInfoImpl.java 2011-08-05 08:52:27 UTC (rev 33624)
+++ trunk/hibernatetools/plugins/org.jboss.tools.hibernate.jpt.core/src/org/jboss/tools/hibernate/jpt/core/internal/context/java/HibernatePackageInfoImpl.java 2011-08-05 10:38:33 UTC (rev 33625)
@@ -14,6 +14,7 @@
import java.util.List;
import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
import org.eclipse.jdt.core.dom.CompilationUnit;
import org.eclipse.jpt.common.core.utility.TextRange;
import org.eclipse.jpt.common.utility.Filter;
@@ -67,6 +68,11 @@
public HibernateJavaTypeDefContainer getTypeDefContainer() {
return this.typeDefContainer;
}
+
+ @Override
+ public IResource getResource() {
+ return resourcePackage.getFile();
+ }
// ********** synchronize/update **********
14 years, 8 months
JBoss Tools SVN: r33624 - in trunk/as/plugins: org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-08-05 04:52:27 -0400 (Fri, 05 Aug 2011)
New Revision: 33624
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/FilesetUtil.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/NewServerFilesetHandler.java
trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/CustomRuntimeClasspathModel.java
Log:
JBIDE-1354 - classpath issues
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/FilesetUtil.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/FilesetUtil.java 2011-08-05 08:05:16 UTC (rev 33623)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/FilesetUtil.java 2011-08-05 08:52:27 UTC (rev 33624)
@@ -31,6 +31,12 @@
return loadFilesets(getFile(server), server);
}
+ /**
+ * Must return a list of filesets. NOT NULL
+ * @param file
+ * @param server
+ * @return
+ */
public static Fileset[] loadFilesets(File file, IServer server) {
if( file != null && file.exists()) {
try {
@@ -40,14 +46,27 @@
return new Fileset[]{};
}
+ /**
+ * May return null, or a list of filesets
+ * @param is
+ * @param server
+ * @return
+ */
public static Fileset[] loadFilesets(InputStream is, IServer server) {
Fileset[] sets = loadFilesets(is);
- for( int i = 0; i < sets.length; i++ ) {
- sets[i].setServer(server);
+ if( sets != null ) {
+ for( int i = 0; i < sets.length; i++ ) {
+ sets[i].setServer(server);
+ }
}
return sets;
}
+ /**
+ * may return null
+ * @param is
+ * @return
+ */
public static Fileset[] loadFilesets(InputStream is) {
Fileset[] filesets = null;
XMLMemento memento = XMLMemento.createReadRoot(is);
@@ -61,7 +80,7 @@
excludes = categoryMementos[i].getString("excludes");//$NON-NLS-1$
filesets[i] = new Fileset(name, folder, includes, excludes);
}
- return filesets == null ? new Fileset[] { } : filesets;
+ return filesets;
}
public static void saveFilesets(IServer server, Fileset[] sets) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/NewServerFilesetHandler.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/NewServerFilesetHandler.java 2011-08-05 08:05:16 UTC (rev 33623)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/filesets/NewServerFilesetHandler.java 2011-08-05 08:52:27 UTC (rev 33624)
@@ -36,7 +36,7 @@
if( url != null ) {
InputStream fis = url.openStream();
Fileset[] sets = FilesetUtil.loadFilesets(fis, null);
- if( sets.length != 0 ) {
+ if( sets != null && sets.length != 0 ) {
FilesetUtil.saveFilesets(fileToWrite.toFile(), sets);
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/CustomRuntimeClasspathModel.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/CustomRuntimeClasspathModel.java 2011-08-05 08:05:16 UTC (rev 33623)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.classpath.core/src/org/jboss/ide/eclipse/as/classpath/core/runtime/CustomRuntimeClasspathModel.java 2011-08-05 08:52:27 UTC (rev 33624)
@@ -10,6 +10,11 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.classpath.core.runtime;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
@@ -17,6 +22,7 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.wst.server.core.IRuntime;
import org.eclipse.wst.server.core.IRuntimeType;
+import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.internal.XMLMemento;
import org.jboss.ide.eclipse.archives.webtools.filesets.Fileset;
import org.jboss.ide.eclipse.archives.webtools.filesets.FilesetUtil;
@@ -61,7 +67,7 @@
public IDefaultPathProvider[] getEntries(IRuntimeType type) {
IDefaultPathProvider[] sets = loadFilesets(type);
- if( sets == null || sets.length == 0) {
+ if( sets == null ) {
return getDefaultEntries(type);
}
return sets;
@@ -193,14 +199,25 @@
public static IDefaultPathProvider[] loadFilesets(IRuntimeType rt) {
IPath fileToRead = DEFAULT_CLASSPATH_FS_ROOT.append(rt.getId());
- Fileset[] sets = FilesetUtil.loadFilesets(fileToRead.toFile(), null);
- PathProviderFileset[] newSets = new PathProviderFileset[sets.length];
- for( int i = 0; i < sets.length; i++ ) {
- newSets[i] = new PathProviderFileset(sets[i]);
+ Fileset[] sets = loadFilesets(fileToRead.toFile(), null);
+ if( sets != null ) {
+ PathProviderFileset[] newSets = new PathProviderFileset[sets.length];
+ for( int i = 0; i < sets.length; i++ ) {
+ newSets[i] = new PathProviderFileset(sets[i]);
+ }
+ return newSets;
}
- return newSets;
+ return null;
}
-
+ public static Fileset[] loadFilesets(File file, IServer server) {
+ if( file != null && file.exists()) {
+ try {
+ return FilesetUtil.loadFilesets(new FileInputStream(file), server);
+ } catch( FileNotFoundException fnfe) {}
+ }
+ return null;
+ }
+
public static void saveFilesets(IRuntimeType runtime, IDefaultPathProvider[] sets) {
IPath fileToWrite = DEFAULT_CLASSPATH_FS_ROOT.append(runtime.getId());
XMLMemento memento = XMLMemento.createWriteRoot("classpathProviders"); //$NON-NLS-1$
@@ -216,5 +233,10 @@
// TODO
}
}
+ try {
+ memento.save(new FileOutputStream(fileToWrite.toFile()));
+ } catch( IOException ioe) {
+ // TODO LOG
+ }
}
}
14 years, 8 months
JBoss Tools SVN: r33623 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-08-05 04:05:16 -0400 (Fri, 05 Aug 2011)
New Revision: 33623
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerAlreadyStartedHandler.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossStartLaunchConfiguration.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/dialogs/ServerAlreadyStartedDialog.java
Log:
JBIDE-9243 - adding polling messages to the dialog
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerAlreadyStartedHandler.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerAlreadyStartedHandler.java 2011-08-05 07:38:39 UTC (rev 33622)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/IServerAlreadyStartedHandler.java 2011-08-05 08:05:16 UTC (rev 33623)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.core.server;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.wst.server.core.IServer;
public interface IServerAlreadyStartedHandler {
@@ -28,7 +29,8 @@
* Handle the prompt for this server
*
* @param server
+ * @param startedStatus
* @return One of the constants of this interface
*/
- public int promptForBehaviour(IServer server);
+ public int promptForBehaviour(IServer server, IStatus startedStatus);
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossStartLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossStartLaunchConfiguration.java 2011-08-05 07:38:39 UTC (rev 33622)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossStartLaunchConfiguration.java 2011-08-05 08:05:16 UTC (rev 33623)
@@ -70,10 +70,11 @@
}
Trace.trace(Trace.STRING_FINEST, "Checking if similar server is already up on the same ports."); //$NON-NLS-1$
- boolean started = isServerStarted(jbsBehavior);
+ IStatus startedStatus = isServerStarted(jbsBehavior);
+ boolean started = startedStatus.isOK();
if (started) {
Trace.trace(Trace.STRING_FINEST, "A server is already started. Now handling the already started scenario."); //$NON-NLS-1$
- return handleAlreadyStartedScenario(jbsBehavior);
+ return handleAlreadyStartedScenario(jbsBehavior, startedStatus);
}
Trace.trace(Trace.STRING_FINEST, "A full launch will now proceed."); //$NON-NLS-1$
@@ -85,7 +86,7 @@
* Should ideally use the poller that the server says is its poller,
* but some pollers such as timeout poller
*/
- protected boolean isServerStarted(DelegatingServerBehavior jbsBehavior) {
+ protected IStatus isServerStarted(DelegatingServerBehavior jbsBehavior) {
IServerStatePoller poller = PollThreadUtils.getPoller(IServerStatePoller.SERVER_UP, jbsBehavior.getServer());
// Need to be able to FORCE the poller to poll immediately
@@ -95,13 +96,13 @@
// Trace
Trace.trace(Trace.STRING_FINER, "Checking if a server is already started: " + started.getMessage()); //$NON-NLS-1$
- return started.isOK();
+ return started;
}
- protected boolean handleAlreadyStartedScenario( DelegatingServerBehavior jbsBehavior) {
+ protected boolean handleAlreadyStartedScenario( DelegatingServerBehavior jbsBehavior, IStatus startedStatus) {
IServerAlreadyStartedHandler handler = ExtensionManager.getDefault().getAlreadyStartedHandler(jbsBehavior.getServer());
if( handler != null ) {
- int handlerResult = handler.promptForBehaviour(jbsBehavior.getServer());
+ int handlerResult = handler.promptForBehaviour(jbsBehavior.getServer(), startedStatus);
if( handlerResult == IServerAlreadyStartedHandler.CONTINUE_STARTUP) {
return true;
}
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 2011-08-05 07:38:39 UTC (rev 33622)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/Messages.properties 2011-08-05 08:05:16 UTC (rev 33623)
@@ -227,6 +227,6 @@
ServerAlreadyStartedDialog_Message=An application server may already be running on host {0}.
ServerAlreadyStartedDialog_Title=Server already running on {0}
-ServerAlreadyStartedDialog_Desc=Launching an additional server when one is already running may \nmake some parts of the tools not function properly. \n\n Would you like to:
+ServerAlreadyStartedDialog_Desc=Launching an additional server when one is already running may \nmake some parts of the tools not function properly. \n\n{0}\n\n Would you like to:
ServerAlreadyStartedDialog_Connect=Set the server adapter to 'started', but do not launch
ServerAlreadyStartedDialog_Launch=Launch a new instance anyway
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ServerAlreadyStartedDialog.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ServerAlreadyStartedDialog.java 2011-08-05 07:38:39 UTC (rev 33622)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/dialogs/ServerAlreadyStartedDialog.java 2011-08-05 08:05:16 UTC (rev 33623)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.ui.dialogs;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.jface.dialogs.IMessageProvider;
import org.eclipse.jface.dialogs.TitleAreaDialog;
import org.eclipse.jface.window.Window;
@@ -35,11 +36,12 @@
public boolean accepts(IServer server) {
return true;
}
- public int promptForBehaviour(final IServer server) {
+ public int promptForBehaviour(final IServer server, final IStatus status) {
final int[] result = new int[1];
Display.getDefault().syncExec(new Runnable() {
public void run() {
- ServerAlreadyStartedDialog d = new ServerAlreadyStartedDialog(server,Display.getDefault().getActiveShell());
+ ServerAlreadyStartedDialog d = new ServerAlreadyStartedDialog(server, status,
+ Display.getDefault().getActiveShell());
int dResult = d.open();
if( dResult == Window.CANCEL ) {
result[0] = IServerAlreadyStartedHandler.CANCEL;
@@ -53,10 +55,12 @@
}
private IServer server;
+ private IStatus status;
private boolean launch;
- public ServerAlreadyStartedDialog(IServer server, Shell parentShell) {
+ public ServerAlreadyStartedDialog(IServer server, IStatus status, Shell parentShell) {
super(parentShell);
this.server = server;
+ this.status = status;
}
@Override
protected Control createContents(Composite parent) {
@@ -78,7 +82,7 @@
main.setLayout(new FormLayout());
Label desc = new Label(main, SWT.NONE);
- desc.setText(Messages.ServerAlreadyStartedDialog_Desc);
+ desc.setText(NLS.bind(Messages.ServerAlreadyStartedDialog_Desc, status.getMessage()));
Button connectButton = new Button(main, SWT.RADIO);
connectButton.setText(Messages.ServerAlreadyStartedDialog_Connect);
Button launchButton = new Button(main, SWT.RADIO);
14 years, 8 months
JBoss Tools SVN: r33622 - in trunk/as/plugins/org.jboss.ide.eclipse.as.ui: jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-08-05 03:38:39 -0400 (Fri, 05 Aug 2011)
New Revision: 33622
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ExploreActionProvider.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ModuleActionProvider.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:
JBIDE-9132 - explore command cleanup
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ModuleActionProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ModuleActionProvider.java 2011-08-05 05:11:27 UTC (rev 33621)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/extensions/ModuleActionProvider.java 2011-08-05 07:38:39 UTC (rev 33622)
@@ -1,11 +1,9 @@
package org.jboss.ide.eclipse.as.ui.views.server.extensions;
-import java.io.File;
import java.util.ArrayList;
import java.util.Iterator;
import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IContributionItem;
@@ -26,18 +24,14 @@
import org.eclipse.wst.server.core.ServerUtil;
import org.eclipse.wst.server.core.internal.PublishServerJob;
import org.eclipse.wst.server.core.internal.Server;
+import org.eclipse.wst.server.ui.internal.cnf.ServerActionProvider;
import org.eclipse.wst.server.ui.internal.view.servers.ModuleServer;
-import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.util.ModuleUtil;
-import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
import org.jboss.ide.eclipse.as.ui.Messages;
-import org.jboss.ide.eclipse.as.ui.actions.ExploreUtils;
-import org.jboss.tools.as.wst.server.ui.xpl.ServerActionProvider;
public class ModuleActionProvider extends CommonActionProvider {
private Action deleteModuleAction, fullPublishModuleAction, incrementalPublishModuleAction;
- private Action exploreAction;
private ModuleServer[] selection;
private ICommonActionExtensionSite actionSite;
@@ -78,17 +72,6 @@
deleteModuleAction.setActionDefinitionId(IWorkbenchCommandConstants.EDIT_DELETE);
menu.insertBefore(ServerActionProvider.CONTROL_MODULE_SECTION_END_SEPARATOR, deleteModuleAction);
}
- if (selection.size() == 1) {
- ModuleServer moduleServer = (ModuleServer) selection.getFirstElement();
- IServer server = moduleServer.getServer();
- if (ExploreUtils.canExplore(server)) {
- if (getDeployPath() != null) {
- menu.insertBefore(ServerActionProvider.CONTROL_MODULE_SECTION_END_SEPARATOR, exploreAction);
- boolean exists = getDeployPath().toFile().exists();
- exploreAction.setEnabled(exists);
- }
- }
- }
}
}
@@ -133,20 +116,6 @@
incrementalPublishModuleAction.setDescription(Messages.PublishModuleDescription);
incrementalPublishModuleAction.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.PUBLISH_IMAGE));
- exploreAction = new Action() {
- public void run() {
- IPath path = getDeployPath();
- if (path != null) {
- File file = path.toFile();
- if (file.exists()) {
- ExploreUtils.explore(file.getAbsolutePath());
- }
- }
- }
- };
- exploreAction.setText(ExploreUtils.EXPLORE);
- exploreAction.setDescription(ExploreUtils.EXPLORE_DESCRIPTION);
- exploreAction.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.EXPLORE_IMAGE));
}
protected void actionPublish(int type) {
@@ -192,13 +161,4 @@
t.start();
}
}
-
- private IPath getDeployPath() {
- ModuleServer ms = selection[0];
- IModule[] module = ms.module;
- IDeployableServer deployableServer = ServerConverter.getDeployableServer(ms.server);
- if( deployableServer != null )
- return ExploreUtils.getDeployPath(deployableServer, module);
- return null;
- }
}
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ExploreActionProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ExploreActionProvider.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ExploreActionProvider.java 2011-08-05 07:38:39 UTC (rev 33622)
@@ -0,0 +1,145 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.as.wst.server.ui.xpl;
+
+import java.io.File;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredViewer;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.navigator.CommonActionProvider;
+import org.eclipse.ui.navigator.CommonViewer;
+import org.eclipse.ui.navigator.ICommonActionExtensionSite;
+import org.eclipse.ui.navigator.ICommonViewerSite;
+import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.ui.internal.cnf.ServerActionProvider;
+import org.eclipse.wst.server.ui.internal.view.servers.ModuleServer;
+import org.jboss.ide.eclipse.as.core.publishers.LocalPublishMethod;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
+import org.jboss.ide.eclipse.as.ui.JBossServerUISharedImages;
+import org.jboss.ide.eclipse.as.ui.actions.ExploreUtils;
+public class ExploreActionProvider extends CommonActionProvider {
+ private ICommonActionExtensionSite actionSite;
+ private CommonViewer cv;
+ public ExploreActionProvider() {
+ super();
+ }
+
+ private Action exploreAction;
+
+ public void init(ICommonActionExtensionSite aSite) {
+ super.init(aSite);
+ this.actionSite = aSite;
+ ICommonViewerSite site = aSite.getViewSite();
+ if( site instanceof ICommonViewerWorkbenchSite ) {
+ StructuredViewer v = aSite.getStructuredViewer();
+ if( v instanceof CommonViewer ) {
+ cv = (CommonViewer)v;
+ ICommonViewerWorkbenchSite wsSite = (ICommonViewerWorkbenchSite)site;
+ createActions(cv, wsSite.getSelectionProvider());
+ }
+ }
+ }
+ public void createActions(CommonViewer tableViewer, ISelectionProvider provider) {
+ Shell shell = tableViewer.getTree().getShell();
+ exploreAction = new Action() {
+ public void run() {
+ runExplore();
+ }
+ };
+ exploreAction.setText(ExploreUtils.EXPLORE);
+ exploreAction.setDescription(ExploreUtils.EXPLORE_DESCRIPTION);
+ exploreAction.setImageDescriptor(JBossServerUISharedImages.getImageDescriptor(JBossServerUISharedImages.EXPLORE_IMAGE));
+ }
+
+ private void runExplore() {
+ if( getModuleServer() != null )
+ runExploreModuleServer();
+ else
+ runExploreServer();
+ }
+
+ public void fillContextMenu(IMenuManager menu) {
+ boolean enabled = false;
+ if( getModuleServer() != null )
+ menu.insertBefore(ServerActionProvider.CONTROL_MODULE_SECTION_END_SEPARATOR, exploreAction);
+ else
+ menu.insertBefore(ServerActionProvider.SERVER_ETC_SECTION_END_SEPARATOR, exploreAction);
+ if( getServer() != null ) {
+ String mode = getServer().getAttribute(IDeployableServer.SERVER_MODE, LocalPublishMethod.LOCAL_PUBLISH_METHOD);
+ if( LocalPublishMethod.LOCAL_PUBLISH_METHOD.equals(mode)) {
+ enabled = true;
+ }
+ }
+ exploreAction.setEnabled(enabled);
+ }
+
+ public void runExploreServer() {
+ String deployDirectory = ExploreUtils.getDeployDirectory(getServer());
+ if (deployDirectory != null && deployDirectory.length() > 0) {
+ ExploreUtils.explore(deployDirectory);
+ }
+ }
+
+ public void runExploreModuleServer() {
+ IPath path = getModuleDeployPath();
+ if (path != null) {
+ File file = path.toFile();
+ if (file.exists()) {
+ ExploreUtils.explore(file.getAbsolutePath());
+ }
+ }
+ }
+ private IPath getModuleDeployPath() {
+ ModuleServer ms = getModuleServer();
+ IModule[] module = ms.module;
+ IDeployableServer deployableServer = ServerConverter.getDeployableServer(ms.server);
+ if( deployableServer != null )
+ return ExploreUtils.getDeployPath(deployableServer, module);
+ return null;
+ }
+
+ public IServer getServer() {
+ Object o = getSelection();
+ if (o instanceof IServer)
+ return ((IServer)o);
+ if( o instanceof ModuleServer)
+ return ((ModuleServer) o).server;
+ return null;
+ }
+
+ public ModuleServer getModuleServer() {
+ Object o = getSelection();
+ if( o instanceof ModuleServer)
+ return ((ModuleServer) o);
+ return null;
+ }
+
+ protected Object getSelection() {
+ ICommonViewerSite site = actionSite.getViewSite();
+ IStructuredSelection selection = null;
+ if (site instanceof ICommonViewerWorkbenchSite) {
+ ICommonViewerWorkbenchSite wsSite = (ICommonViewerWorkbenchSite) site;
+ selection = (IStructuredSelection) wsSite.getSelectionProvider()
+ .getSelection();
+ Object first = selection.getFirstElement();
+ return first;
+ }
+ return null;
+ }
+}
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 2011-08-05 05:11:27 UTC (rev 33621)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerActionProvider.java 2011-08-05 07:38:39 UTC (rev 33622)
@@ -11,321 +11,10 @@
*******************************************************************************/
package org.jboss.tools.as.wst.server.ui.xpl;
-import java.util.Iterator;
-
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IAction;
-import org.eclipse.jface.action.IContributionManager;
-import org.eclipse.jface.action.IMenuListener;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.action.MenuManager;
-import org.eclipse.jface.action.Separator;
-import org.eclipse.jface.bindings.TriggerSequence;
-import org.eclipse.jface.viewers.IOpenListener;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.viewers.OpenEvent;
-import org.eclipse.jface.viewers.StructuredViewer;
-import org.eclipse.swt.dnd.Clipboard;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IActionBars;
-import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.IWorkbenchActionConstants;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.actions.ActionFactory;
-import org.eclipse.ui.keys.IBindingService;
import org.eclipse.ui.navigator.CommonActionProvider;
-import org.eclipse.ui.navigator.CommonViewer;
-import org.eclipse.ui.navigator.ICommonActionExtensionSite;
-import org.eclipse.ui.navigator.ICommonViewerSite;
-import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
-import org.eclipse.wst.server.core.IModule;
-import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.ServerPort;
-import org.eclipse.wst.server.core.model.ServerDelegate;
-import org.eclipse.wst.server.ui.internal.Messages;
-import org.eclipse.wst.server.ui.internal.ServerUIPlugin;
-import org.eclipse.wst.server.ui.internal.actions.NewServerWizardAction;
-import org.eclipse.wst.server.ui.internal.view.servers.CopyAction;
-import org.eclipse.wst.server.ui.internal.view.servers.DeleteAction;
-import org.eclipse.wst.server.ui.internal.view.servers.ModuleServer;
-import org.eclipse.wst.server.ui.internal.view.servers.ModuleSloshAction;
-import org.eclipse.wst.server.ui.internal.view.servers.MonitorServerPortAction;
-import org.eclipse.wst.server.ui.internal.view.servers.OpenAction;
-import org.eclipse.wst.server.ui.internal.view.servers.PasteAction;
-import org.eclipse.wst.server.ui.internal.view.servers.PropertiesAction;
-import org.eclipse.wst.server.ui.internal.view.servers.PublishAction;
-import org.eclipse.wst.server.ui.internal.view.servers.RemoveModuleAction;
-import org.eclipse.wst.server.ui.internal.view.servers.RenameAction;
-import org.eclipse.wst.server.ui.internal.view.servers.RestartModuleAction;
-import org.eclipse.wst.server.ui.internal.view.servers.ShowInConsoleAction;
-import org.eclipse.wst.server.ui.internal.view.servers.ShowInDebugAction;
-import org.eclipse.wst.server.ui.internal.view.servers.StartAction;
-import org.eclipse.wst.server.ui.internal.view.servers.StartModuleAction;
-import org.eclipse.wst.server.ui.internal.view.servers.StopAction;
-import org.eclipse.wst.server.ui.internal.view.servers.StopModuleAction;
/**
* @deprecated
*/
public class ServerActionProvider extends CommonActionProvider {
- public static final String NEW_MENU_ID = "org.jboss.tools.as.wst.server.ui.internal.cnf.newMenuId"; //$NON-NLS-1$
- public static final String SHOW_IN_MENU_ID = "org.jboss.tools.as.wst.server.ui.internal.cnf.showInMenuId"; //$NON-NLS-1$
- public static final String TOP_SECTION_START_SEPARATOR = "org.jboss.tools.as.wst.server.ui.internal.cnf.topSectionStart"; //$NON-NLS-1$
- public static final String TOP_SECTION_END_SEPARATOR = "org.jboss.tools.as.wst.server.ui.internal.cnf.topSectionEnd"; //$NON-NLS-1$
- public static final String EDIT_SECTION_START_SEPARATOR = "org.jboss.tools.as.wst.server.ui.internal.cnfeditSectionStart"; //$NON-NLS-1$
- public static final String EDIT_SECTION_END_SEPARATOR = "org.jboss.tools.as.wst.server.ui.internal.cnf.editSectionEnd"; //$NON-NLS-1$
- public static final String CONTROL_SERVER_SECTION_START_SEPARATOR = "org.jboss.tools.as.wst.server.ui.internal.cnf.controlServerSectionStart"; //$NON-NLS-1$
- public static final String CONTROL_SERVER_SECTION_END_SEPARATOR = "org.jboss.tools.as.wst.server.ui.internal.cnf.controlServerSectionEnd"; //$NON-NLS-1$
- public static final String SERVER_ERATA_SECTION_START_SEPARATOR = "org.jboss.tools.as.wst.server.ui.internal.cnf.serverErataSectionStart"; //$NON-NLS-1$
- public static final String SERVER_ERATA_SECTION_END_SEPARATOR = "org.jboss.tools.as.wst.server.ui.internal.cnf.serverErataSectionEnd"; //$NON-NLS-1$
- public static final String CONTROL_MODULE_SECTION_START_SEPARATOR = "org.jboss.tools.as.wst.server.ui.internal.cnf.controlModuleSectionStart"; //$NON-NLS-1$
- public static final String CONTROL_MODULE_SECTION_END_SEPARATOR = "org.jboss.tools.as.wst.server.ui.internal.cnf.controlModuleSectionEnd"; //$NON-NLS-1$
-
- private ICommonActionExtensionSite actionSite;
- private Clipboard clipboard;
- public ServerActionProvider() {
- super();
- }
-
- public void init(ICommonActionExtensionSite aSite) {
- super.init(aSite);
- this.actionSite = aSite;
- ICommonViewerSite site = aSite.getViewSite();
- if( site instanceof ICommonViewerWorkbenchSite ) {
- StructuredViewer v = aSite.getStructuredViewer();
- if( v instanceof CommonViewer ) {
- CommonViewer cv = (CommonViewer)v;
- ICommonViewerWorkbenchSite wsSite = (ICommonViewerWorkbenchSite)site;
- addListeners(cv);
- makeServerActions(cv, wsSite.getSelectionProvider());
- }
- }
- }
-
-
- // actions on a server
- protected Action[] actions;
- protected Action actionModifyModules;
- protected Action openAction, showInConsoleAction, showInDebugAction, propertiesAction, monitorPropertiesAction;
- protected Action copyAction, pasteAction, deleteAction, renameAction;
- protected Action noneAction = new Action(Messages.dialogMonitorNone) {
- // dummy action
- };
-
- private void addListeners(CommonViewer tableViewer) {
- tableViewer.addOpenListener(new IOpenListener() {
- public void open(OpenEvent event) {
- try {
- IStructuredSelection sel = (IStructuredSelection) event.getSelection();
- Object data = sel.getFirstElement();
- if (!(data instanceof IServer))
- return;
- IServer server = (IServer) data;
- ServerUIPlugin.editServer(server);
- } catch (Exception e) {
- //Trace.trace(Trace.STRING_SEVERE, org.jboss.ide.eclipse.as.ui.Messages.ServerActionProvider_CouldNotOpenServerError, e);
- }
- }
- });
- }
-
- private void makeServerActions(CommonViewer tableViewer, ISelectionProvider provider) {
- clipboard = new Clipboard(tableViewer.getTree().getDisplay());
- Shell shell = tableViewer.getTree().getShell();
-
- 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);
- actions[2] = new StartAction(shell, provider, ILaunchManager.PROFILE_MODE);
-
- // create the stop action
- actions[3] = new StopAction(shell, provider);
-
- // create the publish actions
- actions[4] = new PublishAction(shell, provider);
- //actions[5] = new ExploreAction(shell,provider);
-
- // create the open action
- openAction = new OpenAction(provider);
-
-// // create copy, paste, and delete actions
- pasteAction = new PasteAction(shell, provider, clipboard);
- copyAction = new CopyAction(provider, clipboard, pasteAction);
- deleteAction = new DeleteAction(shell, provider);
- renameAction = new RenameAction(shell, tableViewer, provider);
-
- // create the other actions
- actionModifyModules = new ModuleSloshAction(shell, provider);
- showInConsoleAction = new ShowInConsoleAction(provider);
- showInDebugAction = new ShowInDebugAction(provider);
-
- // create the properties action
- propertiesAction = new PropertiesAction(shell, provider);
- monitorPropertiesAction = new PropertiesAction(shell, "org.eclipse.wst.server.ui.properties.monitor", provider); //$NON-NLS-1$
- }
-
- public void fillActionBars(IActionBars actionBars) {
- actionBars.setGlobalActionHandler("org.eclipse.wst.server.debug", actions[0]); //$NON-NLS-1$
- actionBars.setGlobalActionHandler("org.eclipse.wst.server.run", actions[1]); //$NON-NLS-1$
- actionBars.setGlobalActionHandler("org.eclipse.wst.server.stop", actions[3]); //$NON-NLS-1$
- actionBars.setGlobalActionHandler("org.eclipse.wst.server.publish", actions[4]); //$NON-NLS-1$
- actionBars.setGlobalActionHandler("org.eclipse.ui.navigator.Open", openAction); //$NON-NLS-1$
- actionBars.setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), propertiesAction);
- actionBars.updateActionBars();
- actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), copyAction);
- actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), pasteAction);
- actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), deleteAction);
- actionBars.setGlobalActionHandler(ActionFactory.RENAME.getId(), renameAction);
-
- IContributionManager cm = actionBars.getToolBarManager();
- cm.removeAll();
-
- for (int i = 0; i < actions.length - 1; i++)
- cm.add(actions[i]);
- }
-
- public void fillContextMenu(IMenuManager menu) {
- ICommonViewerSite site = actionSite.getViewSite();
- IStructuredSelection selection = null;
- Shell shell = actionSite.getViewSite().getShell();
- if( site instanceof ICommonViewerWorkbenchSite ) {
- ICommonViewerWorkbenchSite wsSite = (ICommonViewerWorkbenchSite)site;
- selection = (IStructuredSelection) wsSite.getSelectionProvider().getSelection();
- }
-
- IServer server = null;
- IModule[] module = null;
- if (selection != null && !selection.isEmpty()) {
- Iterator iterator = selection.iterator();
- Object obj = iterator.next();
- if (obj instanceof IServer)
- server = (IServer) obj;
- if (obj instanceof ModuleServer) {
- ModuleServer ms = (ModuleServer) obj;
- server = ms.server;
- module = ms.module;
- }
- if (iterator.hasNext()) {
- server = null;
- module = null;
- }
- }
-
- menu.add(invisibleSeparator(TOP_SECTION_START_SEPARATOR));
- addTopSection(menu, server, module);
- menu.add(invisibleSeparator(TOP_SECTION_END_SEPARATOR));
- menu.add(new Separator());
-
- if (server != null && module == null) {
- menu.add(invisibleSeparator(EDIT_SECTION_START_SEPARATOR));
- menu.add(copyAction);
- menu.add(pasteAction);
- menu.add(deleteAction);
- menu.add(renameAction);
- menu.add(invisibleSeparator(EDIT_SECTION_END_SEPARATOR));
-
- menu.add(new Separator());
-
- menu.add(invisibleSeparator(CONTROL_SERVER_SECTION_START_SEPARATOR));
- for (int i = 0; i < actions.length; i++)
- menu.add(actions[i]);
- menu.add(invisibleSeparator(CONTROL_SERVER_SECTION_END_SEPARATOR));
-
- menu.add(new Separator());
-
- menu.add(invisibleSeparator(SERVER_ERATA_SECTION_START_SEPARATOR));
- menu.add(actionModifyModules);
- addMonitor(server, menu, shell);
- menu.add(invisibleSeparator(SERVER_ERATA_SECTION_END_SEPARATOR));
- menu.add(new Separator());
- menu.add(propertiesAction);
-
- } else if (server != null && module != null) {
-
- menu.add(invisibleSeparator(CONTROL_MODULE_SECTION_START_SEPARATOR));
- menu.add(new StartModuleAction(server, module));
- menu.add(new StopModuleAction(server, module));
- menu.add(new RestartModuleAction(server, module));
- if(module.length == 1) {
- menu.add(new RemoveModuleAction(shell, server, module[0]));
- }
- menu.add(invisibleSeparator(CONTROL_MODULE_SECTION_END_SEPARATOR));
- }
-
- menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- menu.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS+"-end")); //$NON-NLS-1$
- }
-
- protected void addTopSection(IMenuManager menu, IServer server, IModule[] module) {
- MenuManager newMenu = new MenuManager(Messages.actionNew, NEW_MENU_ID);
- IAction newServerAction = new NewServerWizardAction();
- newServerAction.setText(Messages.actionNewServer);
- newMenu.add(newServerAction);
- menu.add(newMenu);
-
- // open action
- if (server != null && module == null) {
- menu.add(openAction);
-
- String text = Messages.actionShowIn;
- final IWorkbench workbench = PlatformUI.getWorkbench();
- final IBindingService bindingService = (IBindingService) workbench
- .getAdapter(IBindingService.class);
- final TriggerSequence[] activeBindings = bindingService
- .getActiveBindingsFor("org.eclipse.ui.navigate.showInQuickMenu"); //$NON-NLS-1$
- if (activeBindings.length > 0) {
- text += "\t" + activeBindings[0].format(); //$NON-NLS-1$
- }
-
- MenuManager showInMenu = new MenuManager(text, "org.eclipse.ui.navigate.showInQuickMenu"); //$NON-NLS-1$
- showInMenu.add(showInConsoleAction);
- showInMenu.add(showInDebugAction);
- menu.add(showInMenu);
- }
- }
-
- protected void addMonitor(IServer server, IMenuManager menu, Shell shell) {
-
- if (server.getServerType() != null) {
- final MenuManager menuManager = new MenuManager(Messages.actionMonitor);
-
- final IServer server2 = server;
- final Shell shell2 = shell;
- menuManager.addMenuListener(new IMenuListener() {
- public void menuAboutToShow(IMenuManager manager) {
- menuManager.removeAll();
- if (server2.getAdapter(ServerDelegate.class) != null) {
- ServerPort[] ports = server2.getServerPorts(null);
- if (ports != null) {
- int size = ports.length;
- for (int i = 0; i < size; i++) {
- if (!ports[i].isAdvanced())
- menuManager.add(new MonitorServerPortAction(shell2, server2, ports[i]));
- }
- }
- }
-
- if (menuManager.isEmpty())
- menuManager.add(noneAction);
-
- menuManager.add(new Separator());
- menuManager.add(monitorPropertiesAction);
- }
- });
-
- // add an initial menu item so that the menu appears correctly
- noneAction.setEnabled(false);
- menuManager.add(noneAction);
- menu.add(menuManager);
- }
- }
-
-
- private Separator invisibleSeparator(String s) {
- Separator sep = new Separator(s);
- sep.setVisible(false);
- return sep;
- }
+ // Deprecated class
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2011-08-05 05:11:27 UTC (rev 33621)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/plugin.xml 2011-08-05 07:38:39 UTC (rev 33622)
@@ -299,62 +299,7 @@
</view>
</extension>
- <extension
- point="org.eclipse.ui.navigator.navigatorContent">
- <navigatorContent
- activeByDefault="true"
- contentProvider="org.jboss.tools.as.wst.server.ui.xpl.ServerContentProvider"
- icon="$nl$/icons/cview16/servers_view.gif"
- id="org.jboss.tools.as.wst.server.ui.ServersView.content.root"
- labelProvider="org.jboss.tools.as.wst.server.ui.xpl.ServerLabelProvider"
- name="%NavigatorContent_ServersViewDefaultContent"
- priority="highest">
- <triggerPoints>
- <instanceof
- value="java.lang.Object">
- </instanceof>
- </triggerPoints>
- <possibleChildren>
- <instanceof
- value="java.lang.Object">
- </instanceof></possibleChildren>
- <actionProvider
- class="org.jboss.tools.as.wst.server.ui.xpl.ServerActionProvider"
- id="org.jboss.tools.as.wst.server.ui.ServersView.ServerActionProvider"
- priority="highest">
- <enablement>
- <or>
- <instanceof
- value="org.eclipse.wst.server.core.IServer">
- </instanceof>
- <instanceof
- value="org.eclipse.wst.server.ui.internal.view.servers.ModuleServer">
- </instanceof>
- <instanceof
- value="org.eclipse.core.resources.IWorkspaceRoot">
- </instanceof>
- <adapt
- type="java.util.Collection">
- <count
- value="0">
- </count>
- </adapt>
- </or>
- </enablement>
- </actionProvider>
- <dropAssistant
- class="org.jboss.tools.as.wst.server.ui.xpl.ServersViewDropAdapterAssistant"
- id="org.jboss.tools.as.wst.server.ui.ServersView.DropAssistant">
- <possibleDropTargets>
- <instanceof
- value="org.eclipse.wst.server.core.IServer">
- </instanceof></possibleDropTargets>
- </dropAssistant>
- </navigatorContent>
- </extension>
-
<!-- Extensions to new Server View -->
-
<extension
point="org.eclipse.ui.navigator.navigatorContent">
<navigatorContent
@@ -407,6 +352,21 @@
</enablement>
</actionProvider>
<actionProvider
+ class="org.jboss.tools.as.wst.server.ui.xpl.ExploreActionProvider"
+ id="org.jboss.tools.as.wst.server.ui.ServersView.ExploreActionProvider"
+ priority="highest">
+ <enablement>
+ <or>
+ <instanceof
+ value="org.eclipse.wst.server.core.IServer">
+ </instanceof>
+ <instanceof
+ value="org.eclipse.wst.server.ui.internal.view.servers.ModuleServer">
+ </instanceof>
+ </or>
+ </enablement>
+ </actionProvider>
+ <actionProvider
class="org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerLogActionProvider"
id="org.jboss.ide.eclipse.as.ui.extensions.serverLog">
<enablement>
@@ -436,6 +396,8 @@
pattern="org.jboss.ide.eclipse.as.ui.extensions.modules"/>
<actionExtension
pattern="org.jboss.ide.eclipse.as.ui.extensions.serverLog"/>
+ <actionExtension
+ pattern="org.jboss.tools.as.wst.server.ui.ServersView.ExploreActionProvider"/>
</includes>
</viewerActionBinding>
</extension>
@@ -488,6 +450,8 @@
typeIds="%AllJBossServerTypes">
</runtimeLocator>
</extension>
+
+ <!--
<extension point="org.eclipse.ui.popupMenus">
<objectContribution
adaptable="true"
@@ -512,4 +476,5 @@
</action>
</objectContribution>
</extension>
+-->
</plugin>
14 years, 8 months
JBoss Tools SVN: r33621 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-08-05 01:11:27 -0400 (Fri, 05 Aug 2011)
New Revision: 33621
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossStartLaunchConfiguration.java
Log:
JBIDE-9142
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossStartLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossStartLaunchConfiguration.java 2011-08-05 02:24:52 UTC (rev 33620)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/AbstractJBossStartLaunchConfiguration.java 2011-08-05 05:11:27 UTC (rev 33621)
@@ -62,6 +62,13 @@
return false;
}
+ if( jbsBehavior.getServer().getRuntime() == null || jbsBehavior.getServer().getRuntime().getLocation() == null
+ || !jbsBehavior.getServer().getRuntime().getLocation().toFile().exists()) {
+ jbsBehavior.setServerStopped();
+ throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
+ "The server's runtime folder does not exist: " + jbsBehavior.getServer().getRuntime().getLocation())); //$NON-NLS-1$
+ }
+
Trace.trace(Trace.STRING_FINEST, "Checking if similar server is already up on the same ports."); //$NON-NLS-1$
boolean started = isServerStarted(jbsBehavior);
if (started) {
14 years, 8 months
JBoss Tools SVN: r33620 - trunk/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-08-04 22:24:52 -0400 (Thu, 04 Aug 2011)
New Revision: 33620
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
Log:
updated for brew
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2011-08-05 02:24:27 UTC (rev 33619)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2011-08-05 02:24:52 UTC (rev 33620)
@@ -8,7 +8,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>4.1</productnumber>
<edition>4.1.0</edition>
-<pubsnumber>8</pubsnumber>
+<pubsnumber>9</pubsnumber>
<abstract>
<para>The Getting Started Guide explains the JBoss Developer Studio.</para>
</abstract>
14 years, 8 months
JBoss Tools SVN: r33619 - branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-08-04 22:24:27 -0400 (Thu, 04 Aug 2011)
New Revision: 33619
Modified:
branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
Log:
updated for brew
Modified: branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
===================================================================
--- branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2011-08-05 02:21:42 UTC (rev 33618)
+++ branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2011-08-05 02:24:27 UTC (rev 33619)
@@ -8,7 +8,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>4.1</productnumber>
<edition>4.1.0</edition>
-<pubsnumber>8</pubsnumber>
+<pubsnumber>9</pubsnumber>
<abstract>
<para>The Getting Started Guide explains the JBoss Developer Studio.</para>
</abstract>
14 years, 8 months
JBoss Tools SVN: r33618 - trunk/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-08-04 22:21:42 -0400 (Thu, 04 Aug 2011)
New Revision: 33618
Modified:
trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
trunk/documentation/guides/GettingStartedGuide/en-US/jsp_application.xml
Log:
updated to remove war section for TOOLSDOC-236
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2011-08-05 02:21:31 UTC (rev 33617)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2011-08-05 02:21:42 UTC (rev 33618)
@@ -8,7 +8,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>4.1</productnumber>
<edition>4.1.0</edition>
-<pubsnumber>7</pubsnumber>
+<pubsnumber>8</pubsnumber>
<abstract>
<para>The Getting Started Guide explains the JBoss Developer Studio.</para>
</abstract>
Modified: trunk/documentation/guides/GettingStartedGuide/en-US/jsp_application.xml
===================================================================
--- trunk/documentation/guides/GettingStartedGuide/en-US/jsp_application.xml 2011-08-05 02:21:31 UTC (rev 33617)
+++ trunk/documentation/guides/GettingStartedGuide/en-US/jsp_application.xml 2011-08-05 02:21:42 UTC (rev 33618)
@@ -265,7 +265,7 @@
<para>
Writing ant scripts and managing the packaging process can be quite a complicated and time consuming task for even the most trivial web applications. However, <property>JBoss Developer Studio</property> relieves you of this burden. All you need is to start <property>JBoss Server</property> and launch your application in your favorite browser.
</para>
-
+ <!--
<para>
You can also create a WAR archive with JBoss Developer Studio's Archive Tools and export it to any web server.
</para>
@@ -390,7 +390,7 @@
</mediaobject>
</figure>
</section>
-
+ -->
<section id="AutoRedeploy">
<?dbhtml filename="AutoRedeploy.html"?>
<title>Auto redeploy</title>
14 years, 8 months
JBoss Tools SVN: r33617 - branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-08-04 22:21:31 -0400 (Thu, 04 Aug 2011)
New Revision: 33617
Modified:
branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/jsp_application.xml
Log:
updated to remove war section for TOOLSDOC-236
Modified: branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/jsp_application.xml
===================================================================
--- branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/jsp_application.xml 2011-08-05 01:26:59 UTC (rev 33616)
+++ branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/jsp_application.xml 2011-08-05 02:21:31 UTC (rev 33617)
@@ -265,7 +265,7 @@
<para>
Writing ant scripts and managing the packaging process can be quite a complicated and time consuming task for even the most trivial web applications. However, <property>JBoss Developer Studio</property> relieves you of this burden. All you need is to start <property>JBoss Server</property> and launch your application in your favorite browser.
</para>
-
+ <!--
<para>
You can also create a WAR archive with JBoss Developer Studio's Archive Tools and export it to any web server.
</para>
@@ -390,7 +390,7 @@
</mediaobject>
</figure>
</section>
-
+ -->
<section id="AutoRedeploy">
<?dbhtml filename="AutoRedeploy.html"?>
<title>Auto redeploy</title>
14 years, 8 months
JBoss Tools SVN: r33616 - branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-08-04 21:26:59 -0400 (Thu, 04 Aug 2011)
New Revision: 33616
Modified:
branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
Log:
updated for brew
Modified: branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
===================================================================
--- branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2011-08-05 01:11:35 UTC (rev 33615)
+++ branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2011-08-05 01:26:59 UTC (rev 33616)
@@ -8,7 +8,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>4.1</productnumber>
<edition>4.1.0</edition>
-<pubsnumber>7</pubsnumber>
+<pubsnumber>8</pubsnumber>
<abstract>
<para>The Getting Started Guide explains the JBoss Developer Studio.</para>
</abstract>
14 years, 8 months