JBoss Tools SVN: r4436 - trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-22 21:21:59 -0400 (Mon, 22 Oct 2007)
New Revision: 4436
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties
Log:
JBIDE-829
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties 2007-10-23 01:16:33 UTC (rev 4435)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/ArchivesUIMessages.properties 2007-10-23 01:21:59 UTC (rev 4436)
@@ -12,7 +12,7 @@
ProjectPackagesView_editFolderAction_label=Edit Folder
ProjectPackagesView_editFilesetAction_label=Edit Fileset
ProjectPackagesView_buildArchiveAction_label=Build Archive
-ProjectPackagesView_buildProjectAction_label=Build Project
+ProjectPackagesView_buildProjectAction_label=Build Project (Full)
ProjectPackagesView_createFolderDialog_title=Create a folder
ProjectPackagesView_createFolderDialog_message=Name of the folder to create
ProjectPackagesView_createFolderDialog_warnFolderExists=The folder "{0}" already exists.
17 years, 2 months
JBoss Tools SVN: r4435 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-22 21:16:33 -0400 (Mon, 22 Oct 2007)
New Revision: 4435
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java
Log:
JBIDE-1131
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java 2007-10-23 01:06:17 UTC (rev 4434)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/FilesetViewProvider.java 2007-10-23 01:16:33 UTC (rev 4435)
@@ -66,6 +66,7 @@
import org.eclipse.swt.widgets.DirectoryDialog;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IEditorDescriptor;
@@ -86,6 +87,7 @@
import org.jboss.ide.eclipse.as.core.util.FileUtil;
import org.jboss.ide.eclipse.as.ui.JBossServerUIPlugin;
import org.jboss.ide.eclipse.as.ui.Messages;
+import org.jboss.ide.eclipse.as.ui.views.server.JBossServerView;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.ServerViewProvider;
import org.jboss.ide.eclipse.as.ui.views.server.extensions.SimplePropertiesViewExtension;
@@ -172,10 +174,16 @@
deleteFileAction = new Action() {
public void run() {
try {
+ Shell shell = JBossServerView.getDefault().getSite().getShell();
PathWrapper wrapper = (PathWrapper)selection;
File file = wrapper.getPath().toFile();
- FileUtil.safeDelete(file);
- refreshViewer();
+ MessageBox mb = new MessageBox(shell,SWT.ICON_QUESTION | SWT.OK | SWT.CANCEL);
+ mb.setText("Delete File?");
+ mb.setMessage("Are you sure you want to delete " + file.getName() + "?");
+ if( mb.open() == SWT.OK) {
+ FileUtil.safeDelete(file);
+ refreshViewer();
+ }
} catch( Exception e ) {
}
}
17 years, 2 months
JBoss Tools SVN: r4434 - trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-22 21:06:17 -0400 (Mon, 22 Oct 2007)
New Revision: 4434
Modified:
trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ArchivesMenuHandler.java
Log:
JBIDE-811
Modified: trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ArchivesMenuHandler.java
===================================================================
--- trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ArchivesMenuHandler.java 2007-10-23 01:01:39 UTC (rev 4433)
+++ trunk/core/plugins/org.jboss.ide.eclipse.archives.ui/src/main/org/jboss/ide/eclipse/archives/ui/views/ArchivesMenuHandler.java 2007-10-23 01:06:17 UTC (rev 4434)
@@ -2,7 +2,11 @@
import java.util.Arrays;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.GroupMarker;
import org.eclipse.jface.action.IMenuListener;
@@ -179,7 +183,12 @@
buildAction = new ActionWithDelegate("", ArchivesSharedImages.getImageDescriptor(ArchivesSharedImages.IMG_BUILD_PACKAGES)) {
public void run() {
- buildSelectedNode();
+ new Job("Build Archive Node") {
+ protected IStatus run(IProgressMonitor monitor) {
+ buildSelectedNode();
+ return Status.OK_STATUS;
+ }
+ }.schedule();
}
public IStructuredSelection getSelection() {
17 years, 2 months
JBoss Tools SVN: r4433 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-22 21:01:39 -0400 (Mon, 22 Oct 2007)
New Revision: 4433
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
Log:
JBIDE-1126
No warning for deletedmodule
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-10-22 23:26:40 UTC (rev 4432)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-10-23 01:01:39 UTC (rev 4433)
@@ -106,17 +106,15 @@
if (ServerBehaviourDelegate.REMOVED == deltaKind) {
status = unpublish(server, module, monitor);
} else if (kind == IServer.PUBLISH_FULL || kind == IServer.PUBLISH_CLEAN) {
- if( deleted ) {
+ if( deleted )
publishState = IServer.PUBLISH_STATE_UNKNOWN;
- throw new CoreException(new Status(IStatus.WARNING, JBossServerCorePlugin.PLUGIN_ID, "The module cannot be published because it cannot be located. (" + modulePath + ")"));
- }
- status = fullPublish(module, module[module.length-1], monitor);
+ else
+ status = fullPublish(module, module[module.length-1], monitor);
} else if (kind == IServer.PUBLISH_INCREMENTAL || kind == IServer.PUBLISH_AUTO) {
- if( deleted ) {
+ if( deleted )
publishState = IServer.PUBLISH_STATE_UNKNOWN;
- throw new CoreException(new Status(IStatus.WARNING, JBossServerCorePlugin.PLUGIN_ID, "The module cannot be published because it cannot be located. (" + modulePath + ")"));
- }
- status = incrementalPublish(module, module[module.length-1], monitor);
+ else
+ status = incrementalPublish(module, module[module.length-1], monitor);
}
return status;
}
17 years, 2 months
JBoss Tools SVN: r4432 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-22 19:26:40 -0400 (Mon, 22 Oct 2007)
New Revision: 4432
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java
Log:
JBIDE-1128
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java 2007-10-22 23:26:37 UTC (rev 4431)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/views/server/providers/events/PollingLabelProvider.java 2007-10-22 23:26:40 UTC (rev 4432)
@@ -99,8 +99,11 @@
if( element instanceof PollThreadEvent ) {
boolean expected = ((PollThreadEvent)element).getExpectedState();
- String expectedString = expected == IServerStatePoller.SERVER_UP ? "startup" : "shutdown";
- if( element.getSpecificType().equals(PollThread.POLL_THREAD_ABORTED)) return expectedString + " aborted";
+ String expectedString = expected == IServerStatePoller.SERVER_UP ? "Startup" : "Shutdown";
+ if( element.getSpecificType().equals(PollThread.POLL_THREAD_ABORTED)) {
+ Object cause = element.getProperty(PollThread.POLL_THREAD_ABORTED_CAUSE);
+ return expectedString + " aborted" + (cause != null ? ": " + cause.toString() : "");
+ }
if( element.getSpecificType().equals(PollThread.POLL_THREAD_TIMEOUT)) return expectedString + " timed out";
if( element.getSpecificType().equals(PollThread.POLL_THREAD_EXCEPTION)) return "Failure: " + element.getProperty(PollThread.POLL_THREAD_EXCEPTION_MESSAGE);
if( element.getSpecificType().equals(PollThread.SUCCESS)) return expectedString + " succeeded";
@@ -108,8 +111,8 @@
if( element.getSpecificType().equals(PollThread.POLLER_NOT_FOUND)) return expectedString + " failed. Poller not found";
}
- if( element.getSpecificType().equals(JMXPoller.EVENT_TYPE_EXCEPTION))
- return (String)element.getProperty(JMXPoller.EXCEPTION_PROPERTY);
+ if( element.getSpecificType().equals(JMXPoller.EVENT_TYPE_EXCEPTION))
+ return "JMXException: " + (String)element.getProperty(JMXPoller.EXCEPTION_PROPERTY);
if( element.getSpecificType().equals(JMXPoller.EVENT_TYPE_STARTING)) {
boolean started = ((Boolean)element.getProperty(JMXPoller.STARTED_PROPERTY)).booleanValue();
if( !started )
@@ -153,11 +156,8 @@
propertyToMessageMap.put(PollThread.EXPECTED_STATE, "Expected State");
propertyToMessageMap.put(JMXPoller.EXCEPTION_PROPERTY, "Exception");
propertyToMessageMap.put(JMXPoller.STARTED_PROPERTY, "Server Started");
-
+ propertyToMessageMap.put(PollThread.POLL_THREAD_ABORTED_CAUSE, "Abort Cause");
// now values and their readable forms
-// propertyToMessageMap.put(JMXPoller.STATUS + DELIMITER + 0, "Server is Down");
-// propertyToMessageMap.put(JMXPoller.STATUS + DELIMITER + 1, "Server is Up");
-// propertyToMessageMap.put(JMXPoller.STATUS + DELIMITER + -1, "Server is in transition");
propertyToMessageMap.put(PollThread.EXPECTED_STATE + DELIMITER + "true", "Up");
propertyToMessageMap.put(PollThread.EXPECTED_STATE + DELIMITER + "false", "Down");
}
17 years, 2 months
JBoss Tools SVN: r4431 - in trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal: launch and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2007-10-22 19:26:37 -0400 (Mon, 22 Oct 2007)
New Revision: 4431
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/PollThread.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
Log:
JBIDE-1128
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java 2007-10-22 23:15:47 UTC (rev 4430)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/JBossServerBehavior.java 2007-10-22 23:26:37 UTC (rev 4431)
@@ -23,6 +23,8 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.DebugEvent;
import org.eclipse.debug.core.DebugException;
import org.eclipse.debug.core.DebugPlugin;
@@ -30,6 +32,7 @@
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.model.IProcess;
import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel;
import org.jboss.ide.eclipse.as.core.extensions.events.EventLogModel.EventLogTreeItem;
import org.jboss.ide.eclipse.as.core.server.IServerStatePoller;
@@ -42,15 +45,18 @@
*
*/
public class JBossServerBehavior extends DeployableServerBehavior {
+ private static final String STOP_FAILED_MESSAGE =
+ "Command to stop server failed. The next attempt will forcefully terminate the process.";
private PollThread pollThread = null;
protected IProcess process;
+ protected boolean nextStopRequiresForce = false;
public JBossServerBehavior() {
super();
}
public void stop(boolean force) {
int state = getServer().getServerState();
- if( force || process == null || process.isTerminated() || state == IServer.STATE_STOPPED) {
+ if( force || process == null || process.isTerminated() || state == IServer.STATE_STOPPED || nextStopRequiresForce) {
forceStop();
return;
}
@@ -64,9 +70,21 @@
}
new Thread() {public void run() {
- serverStopping();
- StopLaunchConfiguration.stop(getServer());
- }}.start();
+ serverStopping();
+ boolean success = StopLaunchConfiguration.stop(getServer());
+ if( !success ) {
+ if( !process.isTerminated() ) {
+ setServerStarted();
+
+ // report it to error log
+ IStatus s = new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
+ "", null);
+ JBossServerCorePlugin.getDefault().getLog().log(s);
+ pollThread.cancel(STOP_FAILED_MESSAGE);
+ nextStopRequiresForce = true;
+ }
+ }
+ }}.start();
}
public void forceStop() {
@@ -134,6 +152,7 @@
}
public void serverStarting() {
+ nextStopRequiresForce = false;
setServerStarting();
pollServer(IServerStatePoller.SERVER_UP);
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/PollThread.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/PollThread.java 2007-10-22 23:15:47 UTC (rev 4430)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/PollThread.java 2007-10-22 23:26:37 UTC (rev 4431)
@@ -49,6 +49,7 @@
public static final String SUCCESS = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.success";
public static final String POLLER_NOT_FOUND = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.pollerNotFound";
public static final String POLL_THREAD_ABORTED = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.aborted";
+ public static final String POLL_THREAD_ABORTED_CAUSE = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.aborted.cause";
public static final String POLL_THREAD_TIMEOUT = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.timeout";
public static final String EXPECTED_STATE = "org.jboss.ide.eclipse.as.core.runtime.server.PollThreadEvent.expectedState";
public static final String POLL_THREAD_EXCEPTION = "org.jboss.ide.eclipse.as.core.runtime.server.PollThread.exception";
@@ -58,6 +59,7 @@
private boolean expectedState;
private IServerStatePoller poller;
private boolean abort;
+ private String abortMessage;
private JBossServerBehavior behavior;
private EventLogRoot eventRoot;
@@ -67,10 +69,10 @@
super(name);
this.expectedState = expectedState;
this.abort = false;
+ this.abortMessage = null;
this.behavior = behavior;
- eventRoot = EventLogModel.getModel(behavior.getServer()).getRoot();
-
- poller = discoverPoller(behavior, expectedState);
+ this.eventRoot = EventLogModel.getModel(behavior.getServer()).getRoot();
+ this.poller = discoverPoller(behavior, expectedState);
}
protected IServerStatePoller discoverPoller(JBossServerBehavior behavior, boolean expectedState) {
@@ -88,7 +90,11 @@
}
public void cancel() {
+ cancel(null);
+ }
+ public void cancel(String message) {
abort = true;
+ abortMessage = message;
}
@@ -231,6 +237,7 @@
protected void alertEventLogAbort() {
PollThreadEvent event = new PollThreadEvent(activeEvent, POLL_THREAD_ABORTED, expectedState);
+ event.setProperty(POLL_THREAD_ABORTED_CAUSE, abortMessage);
EventLogModel.markChanged(activeEvent);
}
protected void alertEventLogTimeout() {
@@ -250,6 +257,7 @@
EventLogModel.markChanged(activeEvent);
}
+
public class PollThreadEvent extends EventLogTreeItem {
public PollThreadEvent(SimpleTreeItem parent, String type, boolean expectedState) {
super(parent, SERVER_STATE_MAJOR_TYPE, type);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2007-10-22 23:15:47 UTC (rev 4430)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/launch/StopLaunchConfiguration.java 2007-10-22 23:26:37 UTC (rev 4431)
@@ -36,6 +36,7 @@
import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.core.model.IProcess;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.wst.server.core.IServer;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
@@ -49,15 +50,20 @@
public static final String STOP_MAIN_TYPE = "org.jboss.Shutdown";
public static final String STOP_JAR_LOC = "bin" + File.separator + "shutdown.jar";
- public static void stop(IServer server) {
+ /* Returns whether termination was normal */
+ public static boolean stop(IServer server) {
try {
ILaunchConfigurationWorkingCopy wc = createLaunchConfiguration(server);
- wc.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
+ ILaunch launch = wc.launch(ILaunchManager.RUN_MODE, new NullProgressMonitor());
+ IProcess stopProcess = launch.getProcesses()[0];
+ while( !stopProcess.isTerminated()) {}
+ return stopProcess.getExitValue() == 0 ? true : false;
} catch( CoreException ce ) {
// report it from here
IStatus s = new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID,
"Unexpected Exception launching stop server command: ", ce);
JBossServerCorePlugin.getDefault().getLog().log(s);
+ return false;
}
}
17 years, 2 months
JBoss Tools SVN: r4430 - in trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test: src/org/jboss/tools/jsf/vpe/richfaces/test and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: svasilyev
Date: 2007-10-22 19:15:47 -0400 (Mon, 22 Oct 2007)
New Revision: 4430
Added:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesTestPlugin.java
Removed:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/Activator.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/AllTests.java
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/ImportRichFacesComponents.java
trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
Log:
RichFaces test was improved and refactored
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF 2007-10-22 19:51:33 UTC (rev 4429)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/META-INF/MANIFEST.MF 2007-10-22 23:15:47 UTC (rev 4430)
@@ -1,9 +1,9 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
-Bundle-Name: Richfaces Plug-in
+Bundle-Name: Richfaces Test Plug-in
Bundle-SymbolicName: org.jboss.tools.jsf.vpe.richfaces.test
Bundle-Version: 1.0.0
-Bundle-Activator: org.jboss.tools.jsf.vpe.richfaces.test.Activator
+Bundle-Activator: org.jboss.tools.jsf.vpe.richfaces.test.RichFacesTestPlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.jboss.tools.vpe,
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/Activator.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/Activator.java 2007-10-22 19:51:33 UTC (rev 4429)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/Activator.java 2007-10-22 23:15:47 UTC (rev 4430)
@@ -1,83 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jsf.vpe.richfaces.test;
-
-import java.net.URL;
-
-import org.eclipse.core.runtime.FileLocator;
-import org.eclipse.core.runtime.Platform;
-import org.jboss.tools.common.log.BaseUIPlugin;
-import org.jboss.tools.common.log.IPluginLog;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends BaseUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.jboss.tools.jsf.vpe.richfaces.test";
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
- public static IPluginLog getPluginLog() {
- return getDefault();
- }
-
- public static String getPluginResourcePath() {
- Bundle bundle = Platform.getBundle(PLUGIN_ID);
- URL url = null;
- try {
- url = bundle == null ? null : FileLocator.resolve(bundle
- .getEntry("/resources"));
- } catch (Exception e) {
- url = bundle.getEntry("/resources");
- }
- return (url == null) ? null : url.getPath();
- }
-}
Deleted: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/AllTests.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/AllTests.java 2007-10-22 19:51:33 UTC (rev 4429)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/AllTests.java 2007-10-22 23:15:47 UTC (rev 4430)
@@ -1,34 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2007 Exadel, Inc. and 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:
- * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.jsf.vpe.richfaces.test;
-
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-/**
- * Class for testing all RichFaces components
- *
- * @author dsakovich(a)exadel.com
- *
- */
-
-public class AllTests {
-
- public static Test suite() {
- TestSuite suite = new TestSuite("Tests for Vpe RichFaces components");
- // $JUnit-BEGIN$
- suite.addTestSuite(RichFacesComponentTest.class);
- // $JUnit-END$
- return suite;
-
- }
-
-}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/ImportRichFacesComponents.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/ImportRichFacesComponents.java 2007-10-22 19:51:33 UTC (rev 4429)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/ImportRichFacesComponents.java 2007-10-22 23:15:47 UTC (rev 4430)
@@ -12,11 +12,8 @@
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
-import java.util.ArrayList;
-import java.util.Collection;
import java.util.zip.ZipFile;
-import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
@@ -40,10 +37,8 @@
private static final String COMPONENTS_PATH = "WebContent/pages"; // $NON-NLS-1$
@SuppressWarnings("restriction")
- public static boolean importRichFacesPages(String path) {
- boolean result = false;
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IProject project = workspace.getRoot().getProject(PROJECT_NAME);
+ static void importRichFacesPages(String path) {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
ZipLeveledStructureProvider zipStructureProvider;
try {
zipStructureProvider =
@@ -64,16 +59,13 @@
importOp.setContext(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell());
importOp.run(new NullProgressMonitor());
- result = true;
-
} catch (InvocationTargetException ite) {
- Activator.getPluginLog().logError(ite.getCause());
+ RichFacesTestPlugin.getPluginLog().logError(ite.getCause());
} catch (InterruptedException ie) {
- Activator.getPluginLog().logError(ie);
+ RichFacesTestPlugin.getPluginLog().logError(ie);
} catch (IOException e) {
- Activator.getPluginLog().logError(e);
+ RichFacesTestPlugin.getPluginLog().logError(e);
}
- return result;
}
/**
@@ -81,31 +73,34 @@
* @return
* @throws CoreException
*/
- public static Collection<IPath> getComponentsPaths() throws CoreException {
- Collection<IPath> result = null;
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IProject project = workspace.getRoot().getProject(PROJECT_NAME);
+ static IPath getComponentPath(String componentPage) throws CoreException {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
if (project != null) {
- IFolder folder = project.getFolder(COMPONENTS_PATH);
- IResource[] resources = folder.members();
- if (resources != null && resources.length > 0) {
- result = new ArrayList<IPath>(resources.length);
- for (IResource res : resources) {
- result.add(res.getFullPath());
- }
+ IResource resource = project.getFolder(COMPONENTS_PATH).findMember(componentPage);
+ if (resource != null) {
+ return resource.getFullPath();
}
+// IResource[] resources = folder.members();
+// if (resources != null && resources.length > 0) {
+// result = new ArrayList<IPath>(resources.length);
+// for (IResource res : resources) {
+// result.add(res.getFullPath());
+// }
+// }
}
- return result;
+
+ return null;
}
/**
*
* @throws CoreException
*/
- public static void removeProject() throws CoreException {
- IWorkspace workspace = ResourcesPlugin.getWorkspace();
- IProject project = workspace.getRoot().getProject(PROJECT_NAME);
- project.delete(IResource.ALWAYS_DELETE_PROJECT_CONTENT,
- new NullProgressMonitor());
+ static void removeProject() throws CoreException {
+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME);
+ if (project != null) {
+ project.delete(IResource.ALWAYS_DELETE_PROJECT_CONTENT,
+ new NullProgressMonitor());
+ }
}
}
Copied: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java (from rev 4429, trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/AllTests.java)
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesAllTests.java 2007-10-22 23:15:47 UTC (rev 4430)
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.richfaces.test;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Class for testing all RichFaces components
+ *
+ * @author dsakovich(a)exadel.com
+ *
+ */
+
+public class RichFacesAllTests {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("Tests for Vpe RichFaces components"); // $NON-NLS-1$
+ // $JUnit-BEGIN$
+ suite.addTestSuite(RichFacesComponentTest.class);
+ // $JUnit-END$
+ return suite;
+
+ }
+
+}
Modified: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2007-10-22 19:51:33 UTC (rev 4429)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesComponentTest.java 2007-10-22 23:15:47 UTC (rev 4430)
@@ -10,8 +10,6 @@
******************************************************************************/
package org.jboss.tools.jsf.vpe.richfaces.test;
-import java.util.Collection;
-
import junit.framework.TestCase;
import org.eclipse.core.resources.IFile;
@@ -20,6 +18,7 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.PartInitException;
@@ -39,8 +38,7 @@
// check warning log
private final static boolean checkWarning = false;
- private boolean failureLog;
- private Collection<IPath> components = null;
+ private Throwable exception;
public RichFacesComponentTest(String name) {
super(name);
@@ -55,11 +53,10 @@
*/
protected void setUp() throws Exception {
super.setUp();
- if (ImportRichFacesComponents.importRichFacesPages(Activator
- .getPluginResourcePath() + TEST_PROJECT_JAR_PATH)) {
- components = ImportRichFacesComponents.getComponentsPaths();
- }
- failureLog = false;
+
+ ImportRichFacesComponents.importRichFacesPages(RichFacesTestPlugin
+ .getPluginResourcePath() + TEST_PROJECT_JAR_PATH);
+
waitForJobs();
Platform.addLogListener(this);
waitForJobs();
@@ -110,33 +107,171 @@
* Wait until all background tasks are complete.
*/
public void waitForJobs() {
- while (Platform.getJobManager().currentJob() != null)
+ while (Job.getJobManager().currentJob() != null)
delay(5000);
}
- public void testRichFacesComponent() throws PartInitException {
+ public void testAllComponentsOnSinglePage() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("richFacesTest.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testCalendar() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("calendar.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testDataDefinitionList() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("dataDefinitionList.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testDataFilterSlider() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("dataFilterSlider.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testDataGrid() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("dataGrid.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testDataList() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("dataList.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testDataOrderedList() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("dataOrderedList.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testDataScroller() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("dataScroller.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testDataTable() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("dataTable.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testDragAndDrop() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("dragAndDrop.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testDropDawnMenu() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("dropDawnMenu.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testEffect() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("effect.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testGoogleMap() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("googleMap.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testInputNumberSlider() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("inputNumberSlider.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testInputNumberSpinner() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("inputNumberSpinner.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testInsert() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("insert.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testMessage() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("message.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testMessages() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("messages.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testModalPanel() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("modalPanel.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testPaint2D() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("paint2D.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testPanel() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("panel.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testPanelBar() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("panelBar.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testPanelMenu() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("panelMenu.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testScrollableDataTable() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("scrollableDataTable.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testSeparator() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("separator.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testSimpleTogglePanel() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("simpleTogglePanel.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testSpacer() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("spacer.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testSuggestionBox() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("suggestionbox.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testTabPanel() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("tabPanel.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testTogglePanel() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("togglePanel.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testToolBar() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("toolBar.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testTree() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("tree.xhtml"); // $NON-NLS-1$
+ }
+
+ public void testVirtualEarth() throws PartInitException, Throwable {
+ performTestForRichFacesComponent("virtualEarth.xhtml"); // $NON-NLS-1$
+ }
+
+
+ private void performTestForRichFacesComponent(String componentPage) throws PartInitException, Throwable {
waitForJobs();
- for (IPath componentPath : components) {
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(componentPath);
- IEditorInput input = new FileEditorInput(file);
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input, EDITOR_ID, true);
+ exception = null;
+ IPath componentPath = ImportRichFacesComponents.getComponentPath(componentPage);
+
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(componentPath);
+ IEditorInput input = new FileEditorInput(file);
+
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(input, EDITOR_ID, true);
- waitForJobs();
- delay(3000);
- PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().closeAllEditors(true);
+ waitForJobs();
+ delay(3000);
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().closeAllEditors(true);
+
+ if (exception != null) {
+ throw exception;
}
- assertEquals(failureLog, false);
}
public void logging(IStatus status, String plugin) {
switch (status.getSeverity()) {
case IStatus.ERROR:
- failureLog = true;
+ exception = status.getException();
break;
case IStatus.WARNING:
if (checkWarning)
- failureLog = true;
+ exception = status.getException();
break;
default:
break;
Copied: trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesTestPlugin.java (from rev 4429, trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/Activator.java)
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesTestPlugin.java (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.vpe.richfaces.test/src/org/jboss/tools/jsf/vpe/richfaces/test/RichFacesTestPlugin.java 2007-10-22 23:15:47 UTC (rev 4430)
@@ -0,0 +1,83 @@
+/*******************************************************************************
+ * Copyright (c) 2007 Exadel, Inc. and 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:
+ * Exadel, Inc. and Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.jsf.vpe.richfaces.test;
+
+import java.net.URL;
+
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.common.log.BaseUIPlugin;
+import org.jboss.tools.common.log.IPluginLog;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class RichFacesTestPlugin extends BaseUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.jsf.vpe.richfaces.test"; // $NON-NLS-1$
+
+ // The shared instance
+ private static RichFacesTestPlugin plugin;
+
+ /**
+ * The constructor
+ */
+ public RichFacesTestPlugin() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static RichFacesTestPlugin getDefault() {
+ return plugin;
+ }
+
+ public static IPluginLog getPluginLog() {
+ return getDefault();
+ }
+
+ public static String getPluginResourcePath() {
+ Bundle bundle = Platform.getBundle(PLUGIN_ID);
+ URL url = null;
+ try {
+ url = bundle == null ? null : FileLocator.resolve(bundle
+ .getEntry("/resources")); // $NON-NLS-1$
+ } catch (Exception e) {
+ url = bundle.getEntry("/resources"); // $NON-NLS-1$
+ }
+ return (url == null) ? null : url.getPath();
+ }
+}
17 years, 2 months
JBoss Tools SVN: r4429 - trunk/jst/plugins/org.jboss.tools.jst.web.ui.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-10-22 15:51:33 -0400 (Mon, 22 Oct 2007)
New Revision: 4429
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
Log:
RedHat mentioned WebDevelopment Perspective Factory was removed. All references were updated.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2007-10-22 19:51:08 UTC (rev 4428)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.ui/plugin.xml 2007-10-22 19:51:33 UTC (rev 4429)
@@ -128,40 +128,97 @@
<category name="JBoss Tools Web"
id="org.jboss.tools.jst.web">
</category>
- <wizard category="org.jboss.tools.jst.web" class="org.jboss.tools.jst.web.ui.wizards.newfile.NewCSSFileWizard" icon="images/xstudio/wizards/new_css_file.gif" id="org.jboss.tools.jst.web.ui.wizards.newfile.NewCSSFileWizard" name="CSS File" project="false">
+ <wizard
+ category="org.jboss.tools.jst.web"
+ class="org.jboss.tools.jst.web.ui.wizards.newfile.NewCSSFileWizard"
+ finalPerspective="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"
+ icon="images/xstudio/wizards/new_css_file.gif"
+ id="org.jboss.tools.jst.web.ui.wizards.newfile.NewCSSFileWizard"
+ name="CSS File"
+ preferredPerspectives="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"
+ project="false">
<selection class="org.eclipse.core.resources.IResource">
</selection>
</wizard>
- <wizard category="org.jboss.tools.jst.web" class="org.jboss.tools.jst.web.ui.wizards.newfile.NewJSFileWizard" icon="images/xstudio/wizards/new_js_file.gif" id="org.jboss.tools.jst.web.ui.wizards.newfile.NewJSFileWizard" name="JS File" project="false">
+ <wizard
+ category="org.jboss.tools.jst.web"
+ class="org.jboss.tools.jst.web.ui.wizards.newfile.NewJSFileWizard"
+ finalPerspective="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"
+ icon="images/xstudio/wizards/new_js_file.gif"
+ id="org.jboss.tools.jst.web.ui.wizards.newfile.NewJSFileWizard"
+ name="JS File"
+ preferredPerspectives="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"
+ project="false">
<selection class="org.eclipse.core.resources.IResource">
</selection>
</wizard>
- <wizard category="org.jboss.tools.jst.web" class="org.jboss.tools.jst.web.ui.wizards.newfile.NewWebFileWizard" icon="images/xstudio/wizards/new_webapp_file.gif" id="org.jboss.tools.jst.web.ui.wizards.newfile.NewWebFileWizard" name="Web Descriptor" project="false">
+ <wizard
+ category="org.jboss.tools.jst.web"
+ class="org.jboss.tools.jst.web.ui.wizards.newfile.NewWebFileWizard"
+ finalPerspective="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"
+ icon="images/xstudio/wizards/new_webapp_file.gif"
+ id="org.jboss.tools.jst.web.ui.wizards.newfile.NewWebFileWizard"
+ name="Web Descriptor"
+ preferredPerspectives="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"
+ project="false">
<selection class="org.eclipse.core.resources.IResource">
</selection>
</wizard>
- <wizard category="org.jboss.tools.jst.web" class="org.jboss.tools.common.model.ui.wizard.newfile.NewJSPFileWizard" icon="images/xstudio/wizards/new_jsp_file.gif" id="org.jboss.tools.common.model.ui.wizard.newfile.NewJSPFileWizard" name="JSP File" project="false">
+ <wizard
+ category="org.jboss.tools.jst.web"
+ class="org.jboss.tools.common.model.ui.wizard.newfile.NewJSPFileWizard"
+ finalPerspective="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"
+ icon="images/xstudio/wizards/new_jsp_file.gif"
+ id="org.jboss.tools.common.model.ui.wizard.newfile.NewJSPFileWizard"
+ name="JSP File"
+ preferredPerspectives="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"
+ project="false">
<selection class="org.eclipse.core.resources.IResource">
</selection>
</wizard>
- <wizard
- category="org.jboss.tools.jst.web"
- class="org.jboss.tools.common.model.ui.wizard.newfile.NewXHTMLFileWizard"
- icon="images/xstudio/wizards/new_html_file.gif"
- id="org.jboss.tools.common.model.ui.wizard.newfile.NewXHTMLFileWizard"
- name="XHTML File" project="false">
+ <wizard
+ category="org.jboss.tools.jst.web"
+ class="org.jboss.tools.common.model.ui.wizard.newfile.NewXHTMLFileWizard"
+ finalPerspective="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"
+ icon="images/xstudio/wizards/new_html_file.gif"
+ id="org.jboss.tools.common.model.ui.wizard.newfile.NewXHTMLFileWizard"
+ name="XHTML File"
+ preferredPerspectives="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"
+ project="false">
<selection class="org.eclipse.core.resources.IResource">
</selection>
</wizard>
- <wizard category="org.jboss.tools.jst.web" class="org.jboss.tools.common.model.ui.wizard.newfile.NewHTMLFileWizard" icon="images/xstudio/wizards/new_html_file.gif" id="org.jboss.tools.common.model.ui.wizard.newfile.NewHTMLFileWizard" name="HTML File" project="false">
+ <wizard
+ category="org.jboss.tools.jst.web"
+ class="org.jboss.tools.common.model.ui.wizard.newfile.NewHTMLFileWizard"
+ finalPerspective="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"
+ icon="images/xstudio/wizards/new_html_file.gif"
+ id="org.jboss.tools.common.model.ui.wizard.newfile.NewHTMLFileWizard"
+ name="HTML File"
+ preferredPerspectives="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"
+ project="false">
<selection class="org.eclipse.core.resources.IResource">
</selection>
</wizard>
- <wizard category="org.jboss.tools.jst.web" class="org.jboss.tools.common.model.ui.wizard.newfile.NewPropertiesFileWizard" icon="images/xstudio/wizards/new_properties_file.gif" id="org.jboss.tools.common.model.ui.wizard.newfile.NewPropertiesFileWizard" name="Properties File" project="false">
+ <wizard
+ category="org.jboss.tools.jst.web"
+ class="org.jboss.tools.common.model.ui.wizard.newfile.NewPropertiesFileWizard"
+ icon="images/xstudio/wizards/new_properties_file.gif"
+ id="org.jboss.tools.common.model.ui.wizard.newfile.NewPropertiesFileWizard"
+ name="Properties File"
+ project="false">
<selection class="org.eclipse.core.resources.IResource">
</selection>
</wizard>
- <wizard category="org.jboss.tools.jst.web" class="org.jboss.tools.jst.web.ui.wizards.newfile.NewTLDFileWizard" icon="images/xstudio/wizards/new_taglibs_file.gif" id="org.jboss.tools.jst.web.ui.wizard.newfile.NewTLDFileWizard" name="TLD File" project="false">
+ <wizard
+ category="org.jboss.tools.jst.web"
+ class="org.jboss.tools.jst.web.ui.wizards.newfile.NewTLDFileWizard"
+ finalPerspective="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"
+ icon="images/xstudio/wizards/new_taglibs_file.gif"
+ id="org.jboss.tools.jst.web.ui.wizard.newfile.NewTLDFileWizard"
+ name="TLD File"
+ preferredPerspectives="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective"
+ project="false">
<selection class="org.eclipse.core.resources.IResource">
</selection>
</wizard>
@@ -252,12 +309,12 @@
</extension>
<extension point="org.eclipse.ui.perspectives">
- <perspective class="org.jboss.tools.jst.web.ui.RedHat4WebPerspectiveFactory" icon="images/xstudio/perspective.png" id="org.jboss.tools.jst.web.ui.RedHat4WebPerspective" name="%perspective.name">
+ <perspective class="org.jboss.tools.jst.web.ui.WebDevelopmentPerspectiveFactory" icon="images/xstudio/perspective.png" id="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective" name="%perspective.name">
</perspective>
</extension>
<extension point="org.eclipse.ui.perspectiveExtensions">
- <perspectiveExtension targetID="org.jboss.tools.jst.web.ui.RedHat4WebPerspective">
+ <perspectiveExtension targetID="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective">
<perspectiveShortcut id="org.eclipse.jdt.ui.JavaPerspective">
</perspectiveShortcut>
<perspectiveShortcut id="org.eclipse.debug.ui.DebugPerspective">
@@ -339,29 +396,29 @@
</perspectiveShortcut>
</perspectiveExtension>
<perspectiveExtension targetID="org.eclipse.jdt.ui.JavaPerspective">
- <perspectiveShortcut id="org.jboss.tools.jst.web.ui.RedHat4WebPerspective">
+ <perspectiveShortcut id="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective">
</perspectiveShortcut>
<viewShortcut id="org.jboss.tools.common.model.ui.navigator.NavigatorViewPart">
</viewShortcut>
</perspectiveExtension>
<perspectiveExtension targetID="org.eclipse.ui.resourcePerspective">
- <perspectiveShortcut id="org.jboss.tools.jst.web.ui.RedHat4WebPerspective">
+ <perspectiveShortcut id="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective">
</perspectiveShortcut>
<viewShortcut id="org.jboss.tools.common.model.ui.navigator.NavigatorViewPart">
</viewShortcut>
</perspectiveExtension>
<perspectiveExtension targetID="org.eclipse.debug.ui.DebugPerspective">
- <perspectiveShortcut id="org.jboss.tools.jst.web.ui.RedHat4WebPerspective">
+ <perspectiveShortcut id="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective">
</perspectiveShortcut>
<viewShortcut id="org.jboss.tools.common.model.ui.navigator.NavigatorViewPart">
</viewShortcut>
</perspectiveExtension>
<perspectiveExtension targetID="org.eclipse.jdt.ui.JavaBrowsingPerspective">
- <perspectiveShortcut id="org.jboss.tools.jst.web.ui.RedHat4WebPerspective">
+ <perspectiveShortcut id="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective">
</perspectiveShortcut>
</perspectiveExtension>
<perspectiveExtension targetID="org.eclipse.jdt.ui.JavaHierarchyPerspective">
- <perspectiveShortcut id="org.jboss.tools.jst.web.ui.RedHat4WebPerspective">
+ <perspectiveShortcut id="org.jboss.tools.jst.web.ui.WebDevelopmentPerspective">
</perspectiveShortcut>
</perspectiveExtension>
</extension>
17 years, 2 months
JBoss Tools SVN: r4428 - trunk/jst/tests/org.jboss.tools.jst.web.ui.test/src/org/jboss/tools/jst/web/ui/test.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-10-22 15:51:08 -0400 (Mon, 22 Oct 2007)
New Revision: 4428
Modified:
trunk/jst/tests/org.jboss.tools.jst.web.ui.test/src/org/jboss/tools/jst/web/ui/test/WebViewsTest.java
Log:
RedHat mentioned WebDevelopment Perspective Factory was removed. All references were updated.
Modified: trunk/jst/tests/org.jboss.tools.jst.web.ui.test/src/org/jboss/tools/jst/web/ui/test/WebViewsTest.java
===================================================================
--- trunk/jst/tests/org.jboss.tools.jst.web.ui.test/src/org/jboss/tools/jst/web/ui/test/WebViewsTest.java 2007-10-22 19:51:05 UTC (rev 4427)
+++ trunk/jst/tests/org.jboss.tools.jst.web.ui.test/src/org/jboss/tools/jst/web/ui/test/WebViewsTest.java 2007-10-22 19:51:08 UTC (rev 4428)
@@ -20,7 +20,7 @@
import org.eclipse.ui.WorkbenchException;
import org.jboss.tools.common.model.ui.views.palette.PaletteViewPart;
import org.jboss.tools.jst.web.ui.BrowserView;
-import org.jboss.tools.jst.web.ui.RedHat4WebPerspectiveFactory;
+import org.jboss.tools.jst.web.ui.WebDevelopmentPerspectiveFactory;
import org.jboss.tools.jst.web.ui.navigator.WebProjectsNavigator;
/**
@@ -35,9 +35,9 @@
protected void setUp() throws Exception {
IWorkbench workbench = PlatformUI.getWorkbench();
try {
- workbench.showPerspective(RedHat4WebPerspectiveFactory.PERSPECTIVE_ID,workbench.getActiveWorkbenchWindow());
+ workbench.showPerspective(WebDevelopmentPerspectiveFactory.PERSPECTIVE_ID,workbench.getActiveWorkbenchWindow());
} catch (WorkbenchException e) {
- fail("Cannot load perspective '" +RedHat4WebPerspectiveFactory.PERSPECTIVE_ID + "'");
+ fail("Cannot load perspective '" +WebDevelopmentPerspectiveFactory.PERSPECTIVE_ID + "'");
}
}
@@ -46,7 +46,7 @@
*/
public void testRhdsPerspectiveIsDefined() {
IPerspectiveDescriptor perspective = getRhdsPerspective();
- assertNotNull("Cannot find perspective '" +RedHat4WebPerspectiveFactory.PERSPECTIVE_ID + "'",perspective);
+ assertNotNull("Cannot find perspective '" +WebDevelopmentPerspectiveFactory.PERSPECTIVE_ID + "'",perspective);
}
@@ -54,9 +54,9 @@
IPerspectiveDescriptor perspective = getRhdsPerspective();
IWorkbench workbench =PlatformUI.getWorkbench();
try {
- workbench.showPerspective(RedHat4WebPerspectiveFactory.PERSPECTIVE_ID, workbench.getActiveWorkbenchWindow());
+ workbench.showPerspective(WebDevelopmentPerspectiveFactory.PERSPECTIVE_ID, workbench.getActiveWorkbenchWindow());
} catch (WorkbenchException e) {
- fail("Cannot show perspective '" +RedHat4WebPerspectiveFactory.PERSPECTIVE_ID + "'");
+ fail("Cannot show perspective '" +WebDevelopmentPerspectiveFactory.PERSPECTIVE_ID + "'");
}
}
/**
@@ -89,7 +89,7 @@
*/
private IPerspectiveDescriptor getRhdsPerspective() {
IPerspectiveRegistry reg = getPerspectiveRegistry();
- return reg.findPerspectiveWithId(RedHat4WebPerspectiveFactory.PERSPECTIVE_ID);
+ return reg.findPerspectiveWithId(WebDevelopmentPerspectiveFactory.PERSPECTIVE_ID);
}
/*
17 years, 2 months
JBoss Tools SVN: r4427 - trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2007-10-22 15:51:05 -0400 (Mon, 22 Oct 2007)
New Revision: 4427
Modified:
trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java
Log:
RedHat mentioned WebDevelopment Perspective Factory was removed. All references were updated.
Modified: trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java
===================================================================
--- trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java 2007-10-22 19:51:02 UTC (rev 4426)
+++ trunk/seam/tests/org.jboss.tools.seam.ui.test/src/org/jboss/tools/seam/ui/test/view/SeamComponentsViewTest.java 2007-10-22 19:51:05 UTC (rev 4427)
@@ -39,7 +39,7 @@
import org.eclipse.ui.progress.UIJob;
import org.jboss.tools.common.model.XJob;
import org.jboss.tools.common.test.util.TestProjectProvider;
-import org.jboss.tools.jst.web.ui.RedHat4WebPerspectiveFactory;
+import org.jboss.tools.jst.web.ui.WebDevelopmentPerspectiveFactory;
import org.jboss.tools.seam.core.ISeamComponent;
import org.jboss.tools.seam.core.ISeamPackage;
import org.jboss.tools.seam.core.SeamCorePlugin;
@@ -65,7 +65,7 @@
super.setUp();
//ScopePresentationActionProvider.setPackageStructureFlat(false);
WorkbenchUtils.getWorkbench().showPerspective(
- RedHat4WebPerspectiveFactory.PERSPECTIVE_ID,
+ WebDevelopmentPerspectiveFactory.PERSPECTIVE_ID,
WorkbenchUtils.getWorkbench().getActiveWorkbenchWindow());
TestProjectProvider provider=null;
project = (IProject)ResourcesPlugin.getWorkspace().getRoot().findMember("TestComponentView");
@@ -380,9 +380,13 @@
item2.getAction().run();
refreshProject(project);
-
+ navigator.getCommonViewer().refresh();
navigator.getCommonViewer().expandAll();
-
+ Object[] expanded = navigator.getCommonViewer().getExpandedElements();
+ for (Object object : expanded) {
+ System.out.println(object.getClass().getName());
+ System.out.println(object);
+ }
Tree tree = navigator.getCommonViewer().getTree();
updateTree(tree);
@@ -412,9 +416,10 @@
item2.getAction().run();
refreshProject(project);
-
+ navigator.getCommonViewer().refresh();
navigator.getCommonViewer().expandAll();
-
+ Object[] expanded = navigator.getCommonViewer().getExpandedElements();
+
Tree tree = navigator.getCommonViewer().getTree();
updateTree(tree);
17 years, 2 months