JBoss Tools SVN: r25821 - trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-10-14 07:51:09 -0400 (Thu, 14 Oct 2010)
New Revision: 25821
Modified:
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java
Log:
https://jira.jboss.org/browse/JBIDE-7147 Limited the number of problem markers per file.
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java 2010-10-14 11:48:49 UTC (rev 25820)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java 2010-10-14 11:51:09 UTC (rev 25821)
@@ -85,6 +85,10 @@
store.setValue(JSFSeverityPreferences.UNKNOWN_EL_VARIABLE_NAME, JSFSeverityPreferences.IGNORE);
}
+ /**
+ * See https://jira.jboss.org/browse/JBIDE-7147
+ * @throws CoreException
+ */
public void testMaxNumberOfMarkersPerFile() throws CoreException {
IPreferenceStore store = JSFModelPlugin.getDefault().getPreferenceStore();
int max = store.getInt(SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME);
14 years, 3 months
JBoss Tools SVN: r25820 - in trunk: cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation and 15 other directories.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-10-14 07:48:49 -0400 (Thu, 14 Oct 2010)
New Revision: 25820
Added:
trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/maxNumberOfMarkers.jsp
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java
trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityConfigurationBlock.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencesMessages.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencesMessages.properties
trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/preferences/SeverityPreferences.java
trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBPreferenceInitializer.java
trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBPreferences.java
trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBValidationErrorManager.java
trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ui/ESBConfigurationBlock.java
trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidatorConfigurationBlock.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/preferences/JSFPreferenceInitializer.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/preferences/JSFSeverityPreferences.java
trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/ELValidator.java
trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamEarProjectValidator.java
trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationErrorManager.java
trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java
Log:
https://jira.jboss.org/browse/JBIDE-7147 Limited the number of problem markers per file.
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferenceInitializer.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -47,5 +47,6 @@
defaultPreferences.put(CDIPreferences.ILLEGAL_LIFECYCLE_CALLBACK_INTERCEPTOR_BINDING, CDIPreferences.WARNING);
defaultPreferences.put(CDIPreferences.MISSING_NONBINDING_IN_INTERCEPTOR_BINDING_TYPE_MEMBER, CDIPreferences.WARNING);
defaultPreferences.put(CDIPreferences.ILLEGAL_CONDITIONAL_OBSERVER, CDIPreferences.WARNING);
+ defaultPreferences.putInt(SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, SeverityPreferences.DEFAULT_MAX_NUMBER_OF_MARKERS_PER_FILE);
}
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/preferences/CDIPreferences.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -279,4 +279,8 @@
public static boolean isValidationEnabled(IProject project) {
return INSTANCE.isEnabled(project);
}
+
+ public static int getMaxNumberOfProblemMarkersPerFile(IProject project) {
+ return INSTANCE.getMaxNumberOfProblemMarkersPerResource(project);
+ }
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -24,4 +24,13 @@
protected String getPreference(IProject project, String preferenceKey) {
return CDIPreferences.getInstance().getProjectPreference(project, preferenceKey);
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMaxNumberOfMarkersPerFile(org.eclipse.core.resources.IProject)
+ */
+ @Override
+ public int getMaxNumberOfMarkersPerFile(IProject project) {
+ return CDIPreferences.getMaxNumberOfProblemMarkersPerFile(project);
+ }
}
\ No newline at end of file
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/preferences/CDIConfigurationBlock.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -18,6 +18,7 @@
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
import org.jboss.tools.cdi.core.CDICorePlugin;
import org.jboss.tools.cdi.core.preferences.CDIPreferences;
+import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock;
/**
@@ -171,9 +172,17 @@
keys.add(ALL_SECTIONS[i].options[j].key);
}
}
+ keys.add(MAX_NUMBER_OF_PROBLEMS_KEY);
return keys.toArray(new Key[0]);
}
+ private static final Key MAX_NUMBER_OF_PROBLEMS_KEY = getKey(CDICorePlugin.PLUGIN_ID, SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME);
+
+ @Override
+ protected Key getMaxNumberOfProblemsKey() {
+ return MAX_NUMBER_OF_PROBLEMS_KEY;
+ }
+
public CDIConfigurationBlock(IStatusChangeListener context,
IProject project, IWorkbenchPreferenceContainer container) {
super(context, project, getKeys(), container);
Modified: trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/preferences/SeverityPreferences.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/preferences/SeverityPreferences.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/common/plugins/org.jboss.tools.common/src/org/jboss/tools/common/preferences/SeverityPreferences.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -18,6 +18,7 @@
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jdt.core.JavaCore;
+import org.jboss.tools.common.CommonPlugin;
/**
* Constants for names of seam preferences.
@@ -44,7 +45,9 @@
*/
public abstract class SeverityPreferences {
- public static String ENABLE_BLOCK_PREFERENCE_NAME = "enableBlock";
+ public static final String ENABLE_BLOCK_PREFERENCE_NAME = "enableBlock"; //$NON-NLS-1$
+ public static final String MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME = CommonPlugin.PLUGIN_ID + ".validator.problem.markersBlock"; //$NON-NLS-1$
+ public static final int DEFAULT_MAX_NUMBER_OF_MARKERS_PER_FILE = 20;
public static final String ERROR = "error"; //$NON-NLS-1$
public static final String WARNING = "warning"; //$NON-NLS-1$
@@ -80,6 +83,24 @@
return value != null ? value : getInstancePreference(key);
}
+ public int getMaxNumberOfProblemMarkersPerResource(IProject project) {
+ IEclipsePreferences p = getProjectPreferences(project);
+ if(p == null) {
+ return 0;
+ }
+ String value = p.get(MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, null);
+ if(value!=null) {
+ return p.getInt(MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, 0);
+ }
+ p = getInstancePreferences();
+ value = p == null ? null : p.get(MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, null);
+ if(value!=null) {
+ return p.getInt(MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, 0);
+ }
+ p = getDefaultPreferences();
+ return p.getInt(MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, 0);
+ }
+
public boolean isEnabled(IProject project) {
IEclipsePreferences p = getProjectPreferences(project);
if(p == null) {
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityConfigurationBlock.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityConfigurationBlock.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityConfigurationBlock.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -12,13 +12,17 @@
package org.jboss.tools.common.ui.preferences;
import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jdt.internal.corext.util.Messages;
import org.eclipse.jdt.internal.ui.dialogs.StatusInfo;
import org.eclipse.jdt.internal.ui.preferences.OptionsConfigurationBlock;
+import org.eclipse.jdt.internal.ui.preferences.PreferencesMessages;
import org.eclipse.jdt.internal.ui.preferences.ScrolledPageContent;
import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.layout.PixelConverter;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.FontMetrics;
@@ -28,12 +32,13 @@
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
import org.jboss.tools.common.preferences.SeverityPreferences;
/**
- * Find in SeverirtyPreferences the instruction to Framework for Severity preferences
+ * See more info in SeverityPreferences.
* To modify section descriptions:
* 1) If new option is to be added to existing description,
* add array of two String objects, where first is the preference name
@@ -70,6 +75,8 @@
SeverityPreferencesMessages.VALIDATOR_CONFIGURATION_BLOCK_IGNORE
};
+ protected PixelConverter fPixelConverter;
+
public SeverityConfigurationBlock(IStatusChangeListener context,
IProject project, Key[] allKeys,
IWorkbenchPreferenceContainer container) {
@@ -88,6 +95,9 @@
final ScrolledPageContent sc1 = new ScrolledPageContent(folder);
Composite composite = sc1.getBody();
+
+ addMaxNumberOfMarkersField(composite);
+
GridLayout layout= new GridLayout(nColumns, false);
layout.marginHeight= 0;
layout.marginWidth= 0;
@@ -124,8 +134,37 @@
return sc1;
}
+ protected void addMaxNumberOfMarkersField(Composite composite) {
+ Text text = addTextField(composite, SeverityPreferencesMessages.MAX_NUMBER_OF_MARKERS, getMaxNumberOfProblemsKey(), 0, 0);
+ GridData gd = (GridData) text.getLayoutData();
+ gd.widthHint = fPixelConverter.convertWidthInCharsToPixels(8);
+ gd.horizontalAlignment = GridData.BEGINNING;
+ text.setTextLimit(6);
+ }
+
+ private IStatus validateMaxNumberProblems() {
+ String number = getValue(getMaxNumberOfProblemsKey());
+ StatusInfo status= new StatusInfo();
+ if (number == null || number.length() == 0) {
+ status.setError(PreferencesMessages.JavaBuildConfigurationBlock_empty_input);
+ } else {
+ try {
+ int value= Integer.parseInt(number);
+ if (value <= 0) {
+ status.setError(Messages.format(PreferencesMessages.JavaBuildConfigurationBlock_invalid_input, number));
+ }
+ } catch (NumberFormatException e) {
+ status.setError(Messages.format(PreferencesMessages.JavaBuildConfigurationBlock_invalid_input, number));
+ }
+ }
+ return status;
+ }
+
+ abstract protected Key getMaxNumberOfProblemsKey();
+
@Override
protected Control createContents(Composite parent) {
+ fPixelConverter = new PixelConverter(parent);
setShell(parent.getShell());
Composite mainComp = new Composite(parent, SWT.NONE);
@@ -173,7 +212,15 @@
return;
}
- fContext.statusChanged(new StatusInfo());
+ if (changedKey != null) {
+ if (getMaxNumberOfProblemsKey().equals(changedKey)) {
+ fContext.statusChanged(validateMaxNumberProblems());
+ return;
+ } else {
+ return;
+ }
+ }
+ fContext.statusChanged(validateMaxNumberProblems());
}
public static class SectionDescription {
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencesMessages.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencesMessages.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencesMessages.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -28,6 +28,7 @@
public static String VALIDATOR_CONFIGURATION_BLOCK_IGNORE;
public static String VALIDATOR_CONFIGURATION_BLOCK_WARNING;
public static String ENABLE_VALIDATION;
+ public static String MAX_NUMBER_OF_MARKERS;
static {
NLS.initializeMessages(BUNDLE_NAME, SeverityPreferencesMessages.class);
Modified: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencesMessages.properties
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencesMessages.properties 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferences/SeverityPreferencesMessages.properties 2010-10-14 11:48:49 UTC (rev 25820)
@@ -18,4 +18,6 @@
VALIDATOR_CONFIGURATION_BLOCK_WARNING=Warning
VALIDATOR_CONFIGURATION_BLOCK_IGNORE=Ignore
-ENABLE_VALIDATION=Enable validation
\ No newline at end of file
+ENABLE_VALIDATION=Enable validation
+
+MAX_NUMBER_OF_MARKERS=Maximum number of problems reported per file:
\ No newline at end of file
Modified: trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBPreferenceInitializer.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBPreferenceInitializer.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBPreferenceInitializer.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -31,6 +31,6 @@
for (String name : ESBPreferences.SEVERITY_OPTION_NAMES) {
defaultPreferences.put(name, SeverityPreferences.ERROR);
}
-// defaultPreferences.put(CDIPreferences.DECORATOR_HAS_NAME, CDIPreferences.WARNING);
+ defaultPreferences.putInt(SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, SeverityPreferences.DEFAULT_MAX_NUMBER_OF_MARKERS_PER_FILE);
}
}
\ No newline at end of file
Modified: trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBPreferences.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBPreferences.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBPreferences.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -75,4 +75,7 @@
return INSTANCE.isEnabled(project);
}
+ public static int getMaxNumberOfProblemMarkersPerFile(IProject project) {
+ return INSTANCE.getMaxNumberOfProblemMarkersPerResource(project);
+ }
}
\ No newline at end of file
Modified: trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBValidationErrorManager.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBValidationErrorManager.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ESBValidationErrorManager.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -23,4 +23,13 @@
protected String getPreference(IProject project, String preferenceKey) {
return ESBPreferences.getInstance().getProjectPreference(project, preferenceKey);
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMaxNumberOfMarkersPerFile(org.eclipse.core.resources.IProject)
+ */
+ @Override
+ public int getMaxNumberOfMarkersPerFile(IProject project) {
+ return ESBPreferences.getMaxNumberOfProblemMarkersPerFile(project);
+ }
}
\ No newline at end of file
Modified: trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ui/ESBConfigurationBlock.java
===================================================================
--- trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ui/ESBConfigurationBlock.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/esb/plugins/org.jboss.tools.esb.validator/src/org/jboss/tools/esb/validator/ui/ESBConfigurationBlock.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -16,6 +16,7 @@
import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
+import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock;
import org.jboss.tools.esb.validator.ESBPreferences;
import org.jboss.tools.esb.validator.ESBValidatorPlugin;
@@ -56,9 +57,17 @@
keys.add(ALL_SECTIONS[i].options[j].key);
}
}
+ keys.add(MAX_NUMBER_OF_PROBLEMS_KEY);
return keys.toArray(new Key[0]);
}
+ private static final Key MAX_NUMBER_OF_PROBLEMS_KEY = getKey(ESBValidatorPlugin.PLUGIN_ID, SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME);
+
+ @Override
+ protected Key getMaxNumberOfProblemsKey() {
+ return MAX_NUMBER_OF_PROBLEMS_KEY;
+ }
+
public ESBConfigurationBlock(IStatusChangeListener context,
IProject project, IWorkbenchPreferenceContainer container) {
super(context, project, getKeys(), container);
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/preferences/JSFPreferenceInitializer.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/preferences/JSFPreferenceInitializer.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/preferences/JSFPreferenceInitializer.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -38,5 +38,6 @@
defaultPreferences.put(JSFSeverityPreferences.EL_SYNTAX_ERROR, JSFSeverityPreferences.WARNING);
defaultPreferences.put(JSFSeverityPreferences.CHECK_VARS, JSFSeverityPreferences.ENABLE);
defaultPreferences.put(JSFSeverityPreferences.RE_VALIDATE_UNRESOLVED_EL, JSFSeverityPreferences.ENABLE);
+ defaultPreferences.putInt(SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, SeverityPreferences.DEFAULT_MAX_NUMBER_OF_MARKERS_PER_FILE);
}
}
\ No newline at end of file
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/preferences/JSFSeverityPreferences.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/preferences/JSFSeverityPreferences.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/preferences/JSFSeverityPreferences.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -81,6 +81,10 @@
return INSTANCE.isEnabled(project);
}
+ public static int getMaxNumberOfProblemMarkersPerFile(IProject project) {
+ return INSTANCE.getMaxNumberOfProblemMarkersPerResource(project);
+ }
+
public static boolean shouldValidateEL(IProject project) {
return !(SeverityPreferences.IGNORE.equals(INSTANCE.getProjectPreference(project, UNKNOWN_EL_VARIABLE_NAME)) &&
SeverityPreferences.IGNORE.equals(INSTANCE.getProjectPreference(project, UNKNOWN_EL_VARIABLE_PROPERTY_NAME)) &&
Modified: trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/ELValidator.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/ELValidator.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/jsf/plugins/org.jboss.tools.jsf/src/org/jboss/tools/jsf/web/validation/ELValidator.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -100,6 +100,15 @@
/*
* (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMaxNumberOfMarkersPerFile(org.eclipse.core.resources.IProject)
+ */
+ @Override
+ public int getMaxNumberOfMarkersPerFile(IProject project) {
+ return JSFSeverityPreferences.getMaxNumberOfProblemMarkersPerFile(project);
+ }
+
+ /*
+ * (non-Javadoc)
* @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#init(org.eclipse.core.resources.IProject, org.jboss.tools.jst.web.kb.internal.validation.ContextValidationHelper, org.jboss.tools.jst.web.kb.internal.validation.ValidatorManager, org.eclipse.wst.validation.internal.provisional.core.IReporter, org.jboss.tools.jst.web.kb.validation.IValidationContext)
*/
@Override
@@ -275,7 +284,7 @@
// references[i].addMarker(marker);
}
}
- if(markers<MAX_NUMBER_OF_MARKERS_PER_RESOURCE) {
+ if(markers<getMaxNumberOfMarkersPerFile(file.getProject())) {
validateEL(references[i]);
}
}
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidatorConfigurationBlock.java
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidatorConfigurationBlock.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/src/org/jboss/tools/jsf/ui/preferences/JSFValidatorConfigurationBlock.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -28,6 +28,7 @@
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.forms.widgets.ExpandableComposite;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
+import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock;
import org.jboss.tools.jsf.JSFModelPlugin;
import org.jboss.tools.jsf.preferences.JSFSeverityPreferences;
@@ -69,9 +70,17 @@
}
keys.add(getKey(JSFModelPlugin.PLUGIN_ID, JSFSeverityPreferences.CHECK_VARS));
keys.add(getKey(JSFModelPlugin.PLUGIN_ID, JSFSeverityPreferences.RE_VALIDATE_UNRESOLVED_EL));
+ keys.add(MAX_NUMBER_OF_PROBLEMS_KEY);
return keys.toArray(new Key[0]);
}
+ private static final Key MAX_NUMBER_OF_PROBLEMS_KEY = getKey(JSFModelPlugin.PLUGIN_ID, SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME);
+
+ @Override
+ protected Key getMaxNumberOfProblemsKey() {
+ return MAX_NUMBER_OF_PROBLEMS_KEY;
+ }
+
public JSFValidatorConfigurationBlock(IStatusChangeListener context,
IProject project,
IWorkbenchPreferenceContainer container) {
@@ -85,6 +94,9 @@
final ScrolledPageContent sc1 = new ScrolledPageContent(folder);
Composite composite = sc1.getBody();
+
+ addMaxNumberOfMarkersField(composite);
+
GridLayout layout= new GridLayout(nColumns, false);
layout.marginHeight= 0;
layout.marginWidth= 0;
Added: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/maxNumberOfMarkers.jsp
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/maxNumberOfMarkers.jsp (rev 0)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/maxNumberOfMarkers.jsp 2010-10-14 11:48:49 UTC (rev 25820)
@@ -0,0 +1,4 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
+
+<h:inputText id="userName" value="#{wrongUserName}" required="true"/>
+<h:inputText id="userName" value="#{wrongUserName2}" required="true"/>
\ No newline at end of file
Property changes on: trunk/jsf/tests/org.jboss.tools.jsf.test/projects/JSFKickStartOldFormat/WebContent/pages/maxNumberOfMarkers.jsp
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java
===================================================================
--- trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/jsf/tests/org.jboss.tools.jsf.test/src/org/jboss/tools/jsf/test/validation/ELValidatorTest.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -1,6 +1,5 @@
package org.jboss.tools.jsf.test.validation;
-import java.io.IOException;
import java.text.MessageFormat;
import org.eclipse.core.resources.IFile;
@@ -13,6 +12,7 @@
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.wst.validation.ValidationFramework;
import org.eclipse.wst.validation.internal.core.ValidationException;
+import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.jsf.JSFModelPlugin;
import org.jboss.tools.jsf.preferences.JSFSeverityPreferences;
import org.jboss.tools.jsf.web.validation.JSFValidationMessages;
@@ -34,7 +34,6 @@
}
public void testUnknownELVariable() throws CoreException, ValidationException {
-
IPreferenceStore store = JSFModelPlugin.getDefault().getPreferenceStore();
store.setValue(JSFSeverityPreferences.RE_VALIDATE_UNRESOLVED_EL, JSFSeverityPreferences.ENABLE);
store.setValue(JSFSeverityPreferences.UNKNOWN_EL_VARIABLE_NAME, JSFSeverityPreferences.ERROR);
@@ -85,7 +84,44 @@
store.setValue(JSFSeverityPreferences.RE_VALIDATE_UNRESOLVED_EL, JSFSeverityPreferences.ENABLE);
store.setValue(JSFSeverityPreferences.UNKNOWN_EL_VARIABLE_NAME, JSFSeverityPreferences.IGNORE);
}
+
+ public void testMaxNumberOfMarkersPerFile() throws CoreException {
+ IPreferenceStore store = JSFModelPlugin.getDefault().getPreferenceStore();
+ int max = store.getInt(SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME);
+ store.setValue(SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, 1);
+ String errorSeverity = store.getString(JSFSeverityPreferences.UNKNOWN_EL_VARIABLE_NAME);
+ store.setValue(JSFSeverityPreferences.UNKNOWN_EL_VARIABLE_NAME, JSFSeverityPreferences.ERROR);
+
+ try {
+ assertMarkerIsCreatedForLine(
+ "WebContent/pages/maxNumberOfMarkers.jsp",
+ JSFValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
+ new Object[] {"wrongUserName"},
+ 3);
+ assertMarkerIsNotCreatedForLine(
+ "WebContent/pages/maxNumberOfMarkers.jsp",
+ JSFValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
+ new Object[] {"wrongUserName2"},
+ 4);
+ store.setValue(SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, max);
+
+ assertMarkerIsCreatedForLine(
+ "WebContent/pages/maxNumberOfMarkers.jsp",
+ JSFValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
+ new Object[] {"wrongUserName"},
+ 3);
+ assertMarkerIsCreatedForLine(
+ "WebContent/pages/maxNumberOfMarkers.jsp",
+ JSFValidationMessages.UNKNOWN_EL_VARIABLE_PROPERTY_NAME,
+ new Object[] {"wrongUserName2"},
+ 4);
+ } finally {
+ store.setValue(SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, max);
+ store.setValue(JSFSeverityPreferences.UNKNOWN_EL_VARIABLE_NAME, errorSeverity);
+ }
+ }
+
private void assertMarkerIsCreatedForLine(String fileName, String template, Object[] parameters, int lineNumber) throws CoreException{
String messagePattern = MessageFormat.format(template, parameters);
IFile file = project.getFile(fileName);
@@ -116,7 +152,5 @@
fail("Marker "+messagePattern+" for line - "+lineNumber+" has been found");
}
}
-
}
-
-}
+}
\ No newline at end of file
Modified: trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -40,8 +40,6 @@
*/
public abstract class ValidationErrorManager implements IValidationErrorManager {
- public static final int MAX_NUMBER_OF_MARKERS_PER_RESOURCE = 20;
-
static String VALIDATION_MARKER = ValidationPlugin.PLUGIN_ID + ".problemmarker"; //$NON-NLS-1$
static String VALIDATION_MARKER_OWNER = "owner"; //$NON-NLS-1$
static String VALIDATION_MARKER_GROUP = "groupName"; //$NON-NLS-1$
@@ -211,20 +209,7 @@
return addError(message, severity, messageArguments, lineNumber, length, offset, target, getDocumentProvider(), getMarkerId(), getMarkerOwner());
}
- /**
- *
- * @param message
- * @param severity
- * @param messageArguments
- * @param length
- * @param offset
- * @param target
- * @param documentProvider
- * @param markerId
- * @param markerOwner
- * @return
- */
- public static IMarker addError(String message, int severity, Object[] messageArguments, int lineNumber, int length, int offset, IResource target, TextFileDocumentProvider documentProvider, String markerId, Class markerOwner) {
+ public static IMarker addError(String message, int severity, Object[] messageArguments, int lineNumber, int length, int offset, IResource target, TextFileDocumentProvider documentProvider, String markerId, Class markerOwner, int maxNumberOfMarkersPerFile) {
IMarker marker = null;
try {
if(lineNumber<1) {
@@ -242,7 +227,7 @@
}
marker = addTask(markerOwner.getName().intern(), target, lineNumber,
MessageFormat.format(message, messageArguments),
- severity, null, markerId, offset, length);
+ severity, null, markerId, offset, length, maxNumberOfMarkersPerFile);
} catch (CoreException e) {
WebKbPlugin.getDefault().logError(
NLS.bind(KbMessages.EXCEPTION_DURING_CREATING_MARKER, target.getFullPath()), e);
@@ -255,18 +240,39 @@
return marker;
}
+ /**
+ *
+ * @param message
+ * @param severity
+ * @param messageArguments
+ * @param length
+ * @param offset
+ * @param target
+ * @param documentProvider
+ * @param markerId
+ * @param markerOwner
+ * @return
+ */
+ public IMarker addError(String message, int severity, Object[] messageArguments, int lineNumber, int length, int offset, IResource target, TextFileDocumentProvider documentProvider, String markerId, Class markerOwner) {
+ return addError(message, severity, messageArguments, lineNumber, length, offset, target, documentProvider, markerId, markerOwner, getMaxNumberOfMarkersPerFile(target.getProject()));
+ }
+
+ abstract public int getMaxNumberOfMarkersPerFile(IProject project);
+
private static IMarker addTask(String pluginId, IResource resource, int location,
- String message, int markerType, String targetObjectName,
- String groupName, int offset, int length) throws CoreException {
+ String message, int markerType, String targetObjectName,
+ String groupName, int offset, int length, int maxNumberOfMarkersPerFile) throws CoreException {
if ((message == null) || (resource == null) || (!resource.exists())) {
return null;
}
int severity = getSeverity(markerType);
- int existingMarkers = resource.findMarkers(VALIDATION_MARKER, true, IResource.DEPTH_ZERO).length;
- if(existingMarkers>MAX_NUMBER_OF_MARKERS_PER_RESOURCE) {
- return null;
+ if(maxNumberOfMarkersPerFile>0) {
+ int existingMarkers = resource.findMarkers(VALIDATION_MARKER, true, IResource.DEPTH_ZERO).length;
+ if(existingMarkers>maxNumberOfMarkersPerFile) {
+ return null;
+ }
}
IMarker item = resource.createMarker(VALIDATION_MARKER); // add a validation marker
@@ -301,6 +307,12 @@
return item;
}
+ private IMarker addTask(String pluginId, IResource resource, int location,
+ String message, int markerType, String targetObjectName,
+ String groupName, int offset, int length) throws CoreException {
+ return addTask(pluginId, resource, location, message, markerType, targetObjectName, groupName, offset, length, getMaxNumberOfMarkersPerFile(resource.getProject()));
+ }
+
private static int getSeverity(int severityEnumValue) {
switch (severityEnumValue) {
case (IMessage.HIGH_SEVERITY) : {
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/core/SeamPreferences.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -178,4 +178,8 @@
public static boolean isValidationEnabled(IProject project) {
return INSTANCE.isEnabled(project);
}
+
+ public static int getMaxNumberOfProblemMarkersPerFile(IProject project) {
+ return INSTANCE.getMaxNumberOfProblemMarkersPerResource(project);
+ }
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/SeamPreferenceInitializer.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -41,5 +41,6 @@
//JBIDE-2958 temporary until JBIDE-2957 solved //TODO solve JBIDE-2957
defaultPreferences.put(SeamPreferences.UNKNOWN_COMPONENT_CLASS_NAME_GUESS, SeamPreferences.WARNING);
+ defaultPreferences.putInt(SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME, SeverityPreferences.DEFAULT_MAX_NUMBER_OF_MARKERS_PER_FILE);
}
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamEarProjectValidator.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamEarProjectValidator.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamEarProjectValidator.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -188,11 +188,11 @@
int position = offset + text.indexOf(jarName);
int length = jarName.length();
if(SEAM_JAR_NAME.equals(jarName)) {
- ValidationErrorManager.addError(SeamValidationMessages.INVALID_JAR_MODULE_IN_APPLICATION_XML, IMessage.HIGH_SEVERITY, new String[]{jarName}, 0, length, position, file, documentProvider, SeamValidationErrorManager.MARKED_SEAM_PROJECT_MESSAGE_GROUP, this.getClass());
+ ValidationErrorManager.addError(SeamValidationMessages.INVALID_JAR_MODULE_IN_APPLICATION_XML, IMessage.HIGH_SEVERITY, new String[]{jarName}, 0, length, position, file, documentProvider, SeamValidationErrorManager.MARKED_SEAM_PROJECT_MESSAGE_GROUP, this.getClass(), 0);
break;
}
if(jarName.startsWith(JARS[jarIndex])) {
- ValidationErrorManager.addError(SeamValidationMessages.INVALID_JAR_MODULE_IN_APPLICATION_XML, IMessage.NORMAL_SEVERITY, new String[]{jarName}, 0, length, position, file, documentProvider, SeamValidationErrorManager.MARKED_SEAM_PROJECT_MESSAGE_GROUP, this.getClass());
+ ValidationErrorManager.addError(SeamValidationMessages.INVALID_JAR_MODULE_IN_APPLICATION_XML, IMessage.NORMAL_SEVERITY, new String[]{jarName}, 0, length, position, file, documentProvider, SeamValidationErrorManager.MARKED_SEAM_PROJECT_MESSAGE_GROUP, this.getClass(), 0);
break;
}
}
Modified: trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationErrorManager.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationErrorManager.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/seam/plugins/org.jboss.tools.seam.core/src/org/jboss/tools/seam/internal/core/validation/SeamValidationErrorManager.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -28,4 +28,13 @@
protected String getPreference(IProject project, String preferenceKey) {
return SeamPreferences.getInstance().getProjectPreference(project, preferenceKey);
}
+
+ /*
+ * (non-Javadoc)
+ * @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getMaxNumberOfMarkersPerFile(org.eclipse.core.resources.IProject)
+ */
+ @Override
+ public int getMaxNumberOfMarkersPerFile(IProject project) {
+ return SeamPreferences.getMaxNumberOfProblemMarkersPerFile(project);
+ }
}
\ No newline at end of file
Modified: trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java
===================================================================
--- trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java 2010-10-14 11:33:19 UTC (rev 25819)
+++ trunk/seam/plugins/org.jboss.tools.seam.ui/src/org/jboss/tools/seam/ui/preferences/SeamValidatorConfigurationBlock.java 2010-10-14 11:48:49 UTC (rev 25820)
@@ -17,6 +17,7 @@
import org.eclipse.jdt.internal.ui.wizards.IStatusChangeListener;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.ui.preferences.IWorkbenchPreferenceContainer;
+import org.jboss.tools.common.preferences.SeverityPreferences;
import org.jboss.tools.common.ui.preferences.SeverityConfigurationBlock;
import org.jboss.tools.seam.core.SeamCorePlugin;
import org.jboss.tools.seam.core.SeamPreferences;
@@ -134,8 +135,6 @@
SECTION_SETTINGS
};
- //private PixelConverter fPixelConverter;
-
private static Key[] getKeys() {
ArrayList<Key> keys = new ArrayList<Key>();
for (int i = 0; i < ALL_SECTIONS.length; i++) {
@@ -143,9 +142,17 @@
keys.add(ALL_SECTIONS[i].options[j].key);
}
}
+ keys.add(MAX_NUMBER_OF_PROBLEMS_KEY);
return keys.toArray(new Key[0]);
}
+ private static final Key MAX_NUMBER_OF_PROBLEMS_KEY = getKey(SeamCorePlugin.PLUGIN_ID, SeverityPreferences.MAX_NUMBER_OF_MARKERS_PREFERENCE_NAME);
+
+ @Override
+ protected Key getMaxNumberOfProblemsKey() {
+ return MAX_NUMBER_OF_PROBLEMS_KEY;
+ }
+
public SeamValidatorConfigurationBlock(IStatusChangeListener context,
IProject project,
IWorkbenchPreferenceContainer container) {
14 years, 3 months
JBoss Tools SVN: r25819 - trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor.
by jbosstools-commits@lists.jboss.org
Author: mareshkau
Date: 2010-10-14 07:33:19 -0400 (Thu, 14 Oct 2010)
New Revision: 25819
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/Flasher.java
Log:
Fixing compilation error
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/Flasher.java
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/Flasher.java 2010-10-14 11:22:55 UTC (rev 25818)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/editor/Flasher.java 2010-10-14 11:33:19 UTC (rev 25819)
@@ -58,7 +58,6 @@
};
} else {
drawOutline = new DrawOutlineInterface() {
- @Override
public void drawElementOutline(nsIDOMElement domElement) {
iFlasher.drawElementOutline(domElement);
}
14 years, 3 months
JBoss Tools SVN: r25818 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/deltacloud/ui/commands and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-14 07:22:55 -0400 (Thu, 14 Oct 2010)
New Revision: 25818
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DestroyInstanceHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RebootInstanceHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StartInstanceHandler.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StopInstanceHandler.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/DeltaCloudView.java
Log:
[JBIDE-7329] implemented instance actions with the commands framework
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch 2010-10-14 10:17:19 UTC (rev 25817)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/Deltacloud Tools.launch 2010-10-14 11:22:55 UTC (rev 25818)
@@ -23,8 +23,8 @@
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx1024m"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
-<stringAttribute key="selected_target_plugins" value="org.eclipse.help.webapp@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.core.filesystem@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.wst.validation@default:default,org.eclipse.core.runtime.compatibility.auth@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.ecf.ssl@default:false,org.eclipse.equinox.p2.engine@default:default,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.jface@default:default,org.eclipse.wst.common.emfworkbench.integration@default:default,org.apache.lucene@default:default,org.eclipse.wst.common.environment@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.mortbay.jetty.util@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.equinox.common@2:true,org.eclipse.compare@default:default,org.e!
clipse.ecf.provider.filetransfer@default:default,org.eclipse.ui.console@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.equinox.http.servlet@default:default,org.eclipse.jface.text@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.team.core@default:default,org.eclipse.help@default:default,org.eclipse.swt@default:default,org.mortbay.jetty.server@default:default,org.eclipse.core.jobs@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.ui.navigator.resources@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.core.runtime.compatibility@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,org.eclipse.ant.core@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.apache.xml.serializer@default:default,org.eclipse.ui.cheatsheets@def!
ault:default,org.eclipse.debug.core@default:default,org.eclips!
e.wst.xm
l.core@default:default,org.eclipse.jdt.ui@default:default,org.apache.xml.resolver@default:default,org.jboss.tools.common@default:default,org.eclipse.wst.common.emf@default:default,org.junit4@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.core.runtime@default:true,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.jem.util@default:default,org.apache.ant@default:default,org.eclipse.osgi.services@default:default,org.eclipse.swtbot.ant.optional.junit3@default:false,org.apache.lucene.analysis@default:default,org.eclipse.help.appserver@default:default,org.eclipse.core.net@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.eclipse.rse.services@default:default,org.eclipse.core.resources@default:default,org.eclipse.ui@default:default,org.eclipse.emf.common@default:default,javax.servlet.jsp@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.equinox.p2.metadata.repository@default:default,org.ecl!
ipse.debug.ui@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.help.base@default:default,org.eclipse.equinox.security@default:default,org.eclipse.ui.views@default:default,org.eclipse.ui.editors@default:default,org.eclipse.sdk@default:default,org.eclipse.ui.forms@default:default,org.eclipse.compare.core@default:default,javax.xml@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.jdt.core@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.text@default:default,org.eclipse.osgi.util@default:default,org.eclipse.core.filebuffers@default:default,org.eclipse.wst.sse.core@default:default,org.eclipse.osgi@-1:true,org.eclipse.core.databinding@default:default,org.eclipse.emf.ecore@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.ui.ide@default:default,org.apache.jasper@!
default:default,org.eclipse.search@default:default,org.apache.!
commons.
el@default:default,javax.servlet@default:default,org.eclipse.ui.navigator@default:default,org.eclipse.team.ui@default:default,org.eclipse.core.variables@default:default,com.instantiations.designer.jdt.fragment@default:false,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.rse.core@default:default,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.equinox.registry@default:default,org.eclipse.wst.common.core@default:default,org.eclipse.jdt.launching@default:default,org.eclipse.equinox.app@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.jdt.debug@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.emf.edit@default:default,org.hamcrest.core@default:default,org.eclipse.equinox.preferences@default:default,org.eclipse.update.configurator@3:true,org.eclipse.equinox.jsp.jasper.r!
egistry@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.help.ui@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.core.commands@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.core.expressions@default:default,org.eclipse.ecf.identity@default:default,com.ibm.icu@default:default,org.eclipse.jface.databinding@default:default,org.apache.xerces@default:default,org.eclipse.ecf@default:default,org.eclipse.equinox.security.ui@default:default"/>
-<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.docs@default:default,org.jboss.tools.usage@default:default,org.jboss.tools.deltacloud.core@default:default,org.jboss.tools.deltacloud.ui@default:default"/>
+<stringAttribute key="selected_target_plugins" value="org.eclipse.wst.common.emfworkbench.integration@default:default,org.eclipse.ui.views.properties.tabbed@default:default,org.apache.commons.codec*1.3.0.v20100518-1140@default:default,org.eclipse.ecf.filetransfer@default:default,org.eclipse.core.contenttype@default:default,org.eclipse.equinox.security.ui@default:default,org.eclipse.equinox.p2.metadata@default:default,org.eclipse.swt@default:default,org.eclipse.core.net.linux.x86_64@default:false,org.eclipse.ecf.ssl@default:false,org.eclipse.jdt.compiler.tool@default:false,org.eclipse.swtbot.ant.optional.junit4@default:false,org.eclipse.core.runtime.compatibility@default:default,org.junit*4.8.1.v4_8_1_v20100427-1100@default:default,org.eclipse.rse.services@default:default,org.eclipse.wst.common.uriresolver@default:default,org.eclipse.osgi@-1:true,org.eclipse.core.net@default:default,org.eclipse.equinox.http.jetty@default:default,org.eclipse.core.runtime@default:true,org.jbos!
s.tools.common@default:default,org.eclipse.wst.common.core@default:default,javax.servlet@default:default,org.eclipse.debug.ui@default:default,org.mortbay.jetty.server@default:default,org.eclipse.ecf.provider.filetransfer.ssl@default:false,org.eclipse.core.filesystem.linux.x86_64@default:false,org.eclipse.core.runtime.compatibility.auth@default:default,org.apache.commons.httpclient*3.1.0.v201005080502@default:default,javax.servlet.jsp@default:default,org.eclipse.ui.navigator@default:default,org.apache.commons.logging*1.0.4.v201005080501@default:default,org.eclipse.core.databinding@default:default,org.eclipse.swtbot.ant.optional.junit3@default:false,org.eclipse.wst.sse.core@default:default,org.eclipse.wst.xml.core@default:default,org.apache.xerces@default:default,org.apache.ant@default:default,org.hamcrest.core@default:default,org.eclipse.jface@default:default,org.eclipse.equinox.concurrent@default:default,org.eclipse.core.resources@default:default,org.eclipse.equinox.prefere!
nces@default:default,org.eclipse.jface.databinding@default:def!
ault,com
.instantiations.designer.jdt.fragment@default:false,org.eclipse.emf.ecore@default:default,org.eclipse.help.base@default:default,javax.xml@default:default,org.eclipse.wst.common.project.facet.core@default:default,org.eclipse.help.webapp@default:default,org.eclipse.core.runtime.compatibility.registry@default:false,org.eclipse.core.filesystem@default:default,org.eclipse.help.ui@default:default,org.eclipse.emf.ecore.xmi@default:default,org.eclipse.ecf.identity@default:default,org.eclipse.jface.text@default:default,org.eclipse.wst.common.environment@default:default,org.eclipse.equinox.jsp.jasper.registry@default:default,org.eclipse.equinox.registry@default:default,com.ibm.icu@default:default,org.eclipse.search@default:default,org.eclipse.core.variables@default:default,org.eclipse.core.expressions@default:default,org.eclipse.jdt.core@default:default,org.eclipse.core.filebuffers@default:default,org.junit4@default:default,org.apache.lucene.analysis@default:default,org.mortbay.jetty.!
util@default:default,org.eclipse.compare@default:default,org.eclipse.ui.ide@default:default,org.eclipse.jdt.core.manipulation@default:default,org.eclipse.ui.cheatsheets@default:default,org.eclipse.wst.common.frameworks@default:default,org.eclipse.equinox.http.servlet@default:default,org.eclipse.ui.views@default:default,org.eclipse.ecf.provider.filetransfer@default:default,org.eclipse.jem.util@default:default,org.eclipse.sdk@default:default,org.eclipse.ui.ide.application@default:default,org.eclipse.wst.validation@default:default,org.eclipse.swt.gtk.linux.x86_64@default:false,org.eclipse.equinox.p2.metadata.repository@default:default,org.eclipse.core.databinding.beans@default:default,org.eclipse.equinox.http.registry@default:default,org.eclipse.core.jobs@default:default,org.eclipse.equinox.p2.repository@default:default,org.eclipse.ant.core@default:default,org.eclipse.core.commands@default:default,org.eclipse.equinox.security@default:default,org.apache.lucene@default:default,o!
rg.eclipse.jdt.debug@default:default,org.eclipse.ui.forms@defa!
ult:defa
ult,org.eclipse.ltk.ui.refactoring@default:default,org.eclipse.ecf@default:default,org.eclipse.team.ui@default:default,org.eclipse.help.appserver@default:default,org.eclipse.osgi.util@default:default,org.apache.jasper@default:default,org.eclipse.equinox.jsp.jasper@default:default,org.eclipse.update.configurator@3:true,org.eclipse.help@default:default,org.eclipse.ui.navigator.resources@default:default,org.jboss.tools.xulrunner.initializer@default:false,org.eclipse.equinox.app@default:default,org.eclipse.jdt.ui@default:default,org.eclipse.ui.workbench.texteditor@default:default,org.eclipse.core.databinding.property@default:default,org.eclipse.emf.edit@default:default,org.eclipse.ui@default:default,org.apache.xml.resolver@default:default,org.eclipse.core.databinding.observable@default:default,org.eclipse.emf.ecore.change@default:default,org.eclipse.equinox.p2.engine@default:default,org.eclipse.jdt.compiler.apt@default:false,org.eclipse.ui.console@default:default,org.eclipse.rse!
.core@default:default,org.eclipse.text@default:default,org.eclipse.ltk.core.refactoring@default:default,org.eclipse.osgi.services@default:default,org.eclipse.ui.workbench@default:default,org.eclipse.emf.common@default:default,org.eclipse.team.core@default:default,org.eclipse.compare.core@default:default,org.apache.commons.el@default:default,org.apache.xml.serializer@default:default,org.eclipse.wst.common.emf@default:default,org.eclipse.equinox.common@2:true,org.eclipse.jdt.launching@default:default,org.eclipse.ui.editors@default:default,org.eclipse.equinox.p2.core@default:default,org.eclipse.debug.core@default:default"/>
+<stringAttribute key="selected_workspace_plugins" value="org.jboss.tools.deltacloud.docs@default:default,org.jboss.tools.deltacloud.ui@default:default,org.jboss.tools.deltacloud.core@default:default,org.jboss.tools.usage@default:default"/>
<booleanAttribute key="show_selected_only" value="false"/>
<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
<booleanAttribute key="tracing" value="false"/>
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-10-14 10:17:19 UTC (rev 25817)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/plugin.xml 2010-10-14 11:22:55 UTC (rev 25818)
@@ -102,6 +102,7 @@
name="%Preferences.name">
</page>
</extension>
+ <!-- connection command handlers -->
<extension
point="org.eclipse.ui.handlers">
<handler
@@ -111,7 +112,7 @@
<handler
class="org.jboss.tools.deltacloud.ui.commands.EditConnectionHandler"
commandId="org.jboss.tools.deltacloud.ui.editconnection">
- <enabledWhen>
+ <activeWhen>
<with
variable="selection">
<iterate>
@@ -120,12 +121,12 @@
</instanceof>
</iterate>
</with>
- </enabledWhen>
+ </activeWhen>
</handler>
<handler
class="org.jboss.tools.deltacloud.ui.commands.DisconnectCloudHandler"
commandId="org.eclipse.ui.edit.delete">
- <enabledWhen>
+ <activeWhen>
<with
variable="selection">
<iterate>
@@ -134,8 +135,80 @@
</instanceof>
</iterate>
</with>
- </enabledWhen>
+ </activeWhen>
</handler>
+ <!-- instance command handlers -->
+ <handler
+ class="org.jboss.tools.deltacloud.ui.commands.StartInstanceHandler"
+ commandId="org.jboss.tools.deltacloud.ui.startinstance">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate operator="and">
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CVInstanceElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.jboss.tools.deltacloud.ui.commands.StopInstanceHandler"
+ commandId="org.jboss.tools.deltacloud.ui.stopinstance">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CVInstanceElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.jboss.tools.deltacloud.ui.commands.RebootInstanceHandler"
+ commandId="org.jboss.tools.deltacloud.ui.rebootinstance">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CVInstanceElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.jboss.tools.deltacloud.ui.commands.DestroyInstanceHandler"
+ commandId="org.jboss.tools.deltacloud.ui.destroyinstance">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CVInstanceElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
+ <!-- image command handlers -->
+ <handler
+ class="org.jboss.tools.deltacloud.ui.commands.CreateInstanceHandler"
+ commandId="org.jboss.tools.deltacloud.ui.createinstance">
+ <activeWhen>
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CVImageElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </activeWhen>
+ </handler>
</extension>
<extension
point="org.eclipse.ui.menus">
@@ -145,17 +218,114 @@
<command
commandId="org.eclipse.ui.edit.delete"
label="Disconnect Cloud"
- style="push">
+ style="push"
+ tooltip="Disconnect Cloud">
</command>
<command
commandId="org.jboss.tools.deltacloud.ui.newconnection"
label="New Connection"
- style="push">
+ style="push"
+ tooltip="New Connection">
</command>
<command
commandId="org.jboss.tools.deltacloud.ui.editconnection"
label="Edit Connection"
+ style="push"
+ tooltip="Edit Conncetion">
+ </command>
+ <!-- image commands -->
+ <command
+ commandId="org.jboss.tools.deltacloud.ui.createinstance"
+ icon="icons/instance.gif"
+ label="Launch Instance"
+ style="push"
+ tooltip="Launch Instance">
+ <visibleWhen
+ checkEnabled="true">
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CVImageElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <!-- instance commands -->
+ <command
+ commandId="org.jboss.tools.deltacloud.ui.startinstance"
+ disabledIcon="icons/runningd.gif"
+ icon="icons/running.gif"
+ label="Start"
+ style="push"
+ tooltip="Start">
+ <visibleWhen
+ checkEnabled="true">
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CVInstanceElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.jboss.tools.deltacloud.ui.stopinstance"
+ disabledIcon="icons/stoppedd.gif"
+ icon="icons/stopped.gif"
+ label="Stop"
+ style="push"
+ tooltip="Stop">
+ <visibleWhen
+ checkEnabled="true">
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CVInstanceElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.jboss.tools.deltacloud.ui.rebootinstance"
+ disabledIcon="icons/rebootd.gif"
+ icon="icons/reboot.gif"
+ label="Reboot"
+ style="push"
+ tooltip="Reboot">
+ <visibleWhen
+ checkEnabled="true">
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CVInstanceElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.jboss.tools.deltacloud.ui.destroyinstance"
+ hoverIcon="Destroy"
+ label="Destroy"
style="push">
+ <visibleWhen
+ checkEnabled="true">
+ <with
+ variable="selection">
+ <iterate>
+ <instanceof
+ value="org.jboss.tools.deltacloud.ui.views.CVInstanceElement">
+ </instanceof>
+ </iterate>
+ </with>
+ </visibleWhen>
</command>
</menuContribution>
</extension>
@@ -170,6 +340,33 @@
id="org.jboss.tools.deltacloud.ui.editconnection"
name="Edit Connection">
</command>
+ <!-- image commands -->
+ <command
+ description="Launches an instance"
+ id="org.jboss.tools.deltacloud.ui.createinstance"
+ name="Launch Instance">
+ </command>
+ <!-- instance commands -->
+ <command
+ description="Starts a cloud instance"
+ id="org.jboss.tools.deltacloud.ui.startinstance"
+ name="Start">
+ </command>
+ <command
+ description="Stops a cloud instance"
+ id="org.jboss.tools.deltacloud.ui.stopinstance"
+ name="Stop">
+ </command>
+ <command
+ description="Reboots a cloud instance"
+ id="org.jboss.tools.deltacloud.ui.rebootinstance"
+ name="Reboot">
+ </command>
+ <command
+ description="Stops a cloud instance"
+ id="org.jboss.tools.deltacloud.ui.destroyinstance"
+ name="Destroy">
+ </command>
</extension>
</plugin>
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceHandler.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceHandler.java 2010-10-14 11:22:55 UTC (rev 25818)
@@ -0,0 +1,60 @@
+/*******************************************************************************
+ * 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.deltacloud.ui.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizard;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudImage;
+import org.jboss.tools.deltacloud.ui.views.CVCategoryElement;
+import org.jboss.tools.deltacloud.ui.views.CVCloudElement;
+import org.jboss.tools.deltacloud.ui.views.CVImageElement;
+import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
+import org.jboss.tools.internal.deltacloud.ui.wizards.NewInstance;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class CreateInstanceHandler extends AbstractHandler implements IHandler {
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection) {
+ CVImageElement cvImage = UIUtils.getFirstElement(selection, CVImageElement.class);
+ createInstance(cvImage, HandlerUtil.getActiveShell(event));
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ private void createInstance(CVImageElement cvImage, Shell shell) {
+ if (cvImage != null) {
+ DeltaCloudImage image = (DeltaCloudImage) cvImage.getElement();
+ CVCategoryElement images = (CVCategoryElement) cvImage.getParent();
+ CVCloudElement cloudElement = (CVCloudElement) images.getParent();
+ DeltaCloud cloud = (DeltaCloud) cloudElement.getElement();
+ IWizard wizard = new NewInstance(cloud, image);
+ WizardDialog dialog = new WizardDialog(shell, wizard);
+ dialog.create();
+ dialog.open();
+ }
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/CreateInstanceHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DestroyInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DestroyInstanceHandler.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DestroyInstanceHandler.java 2010-10-14 11:22:55 UTC (rev 25818)
@@ -0,0 +1,64 @@
+/*******************************************************************************
+ * 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.deltacloud.ui.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
+import org.jboss.tools.deltacloud.ui.views.CVCloudElement;
+import org.jboss.tools.deltacloud.ui.views.CVInstanceElement;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.CloudViewElement;
+import org.jboss.tools.deltacloud.ui.views.PerformDestroyInstanceActionThread;
+import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class DestroyInstanceHandler extends AbstractHandler implements IHandler {
+
+ private final static String DESTROYING_INSTANCE_TITLE = "DestroyingInstance.title"; //$NON-NLS-1$
+ private final static String DESTROYING_INSTANCE_MSG = "DestroyingInstance.msg"; //$NON-NLS-1$
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection) {
+ CVInstanceElement cvInstance = UIUtils.getFirstElement(selection, CVInstanceElement.class);
+ rebootInstance(cvInstance);
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ private void rebootInstance(CVInstanceElement cvInstance) {
+ if (cvInstance != null) {
+ DeltaCloudInstance instance = (DeltaCloudInstance) cvInstance.getElement();
+ CloudViewElement element = cvInstance;
+ while (!(element instanceof CVCloudElement))
+ element = (CloudViewElement) element.getParent();
+ CVCloudElement cvcloud = (CVCloudElement) element;
+ DeltaCloud cloud = (DeltaCloud) cvcloud.getElement();
+ PerformDestroyInstanceActionThread t = new PerformDestroyInstanceActionThread(cloud, instance,
+ CVMessages.getString(DESTROYING_INSTANCE_TITLE),
+ CVMessages.getFormattedString(DESTROYING_INSTANCE_MSG, new String[] { instance.getName() }));
+ t.setUser(true);
+ t.schedule();
+ }
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DestroyInstanceHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RebootInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RebootInstanceHandler.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RebootInstanceHandler.java 2010-10-14 11:22:55 UTC (rev 25818)
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * 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.deltacloud.ui.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
+import org.jboss.tools.deltacloud.ui.views.CVCloudElement;
+import org.jboss.tools.deltacloud.ui.views.CVInstanceElement;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.CloudViewElement;
+import org.jboss.tools.deltacloud.ui.views.PerformInstanceActionThread;
+import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class RebootInstanceHandler extends AbstractHandler implements IHandler {
+
+ private final static String REBOOTING_INSTANCE_TITLE = "RebootingInstance.title"; //$NON-NLS-1$
+ private final static String REBOOTING_INSTANCE_MSG = "RebootingInstance.msg"; //$NON-NLS-1$
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection) {
+ CVInstanceElement cvInstance = UIUtils.getFirstElement(selection, CVInstanceElement.class);
+ rebootInstance(cvInstance);
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ private void rebootInstance(CVInstanceElement cvInstance) {
+ if (cvInstance != null) {
+ DeltaCloudInstance instance = (DeltaCloudInstance) cvInstance.getElement();
+ CloudViewElement element = cvInstance;
+ while (!(element instanceof CVCloudElement))
+ element = (CloudViewElement) element.getParent();
+ CVCloudElement cvcloud = (CVCloudElement) element;
+ DeltaCloud cloud = (DeltaCloud) cvcloud.getElement();
+ PerformInstanceActionThread t = new PerformInstanceActionThread(cloud, instance,
+ DeltaCloudInstance.REBOOT,
+ CVMessages.getString(REBOOTING_INSTANCE_TITLE),
+ CVMessages.getFormattedString(REBOOTING_INSTANCE_MSG, new String[] { instance.getName() }),
+ DeltaCloudInstance.RUNNING);
+ t.setUser(true);
+ t.schedule();
+ }
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/RebootInstanceHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StartInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StartInstanceHandler.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StartInstanceHandler.java 2010-10-14 11:22:55 UTC (rev 25818)
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * 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.deltacloud.ui.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
+import org.jboss.tools.deltacloud.ui.views.CVCloudElement;
+import org.jboss.tools.deltacloud.ui.views.CVInstanceElement;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.CloudViewElement;
+import org.jboss.tools.deltacloud.ui.views.PerformInstanceActionThread;
+import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class StartInstanceHandler extends AbstractHandler implements IHandler {
+
+ private final static String STARTING_INSTANCE_TITLE = "StartingInstance.title"; //$NON-NLS-1$
+ private final static String STARTING_INSTANCE_MSG = "StartingInstance.msg"; //$NON-NLS-1$
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection) {
+ CVInstanceElement cvinstance = UIUtils.getFirstElement(selection, CVInstanceElement.class);
+ startInstance(cvinstance);
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ private void startInstance(CVInstanceElement cvInstance) {
+ DeltaCloudInstance instance = (DeltaCloudInstance) cvInstance.getElement();
+ CloudViewElement element = cvInstance;
+ while (!(element instanceof CVCloudElement)) {
+ element = (CloudViewElement) element.getParent();
+ }
+ CVCloudElement cvcloud = (CVCloudElement) element;
+ DeltaCloud cloud = (DeltaCloud) cvcloud.getElement();
+ PerformInstanceActionThread t = new PerformInstanceActionThread(cloud, instance,
+ DeltaCloudInstance.START,
+ CVMessages.getString(STARTING_INSTANCE_TITLE),
+ CVMessages.getFormattedString(STARTING_INSTANCE_MSG, new String[] { instance.getName() }),
+ DeltaCloudInstance.RUNNING);
+ t.setUser(true);
+ t.schedule();
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StartInstanceHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StopInstanceHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StopInstanceHandler.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StopInstanceHandler.java 2010-10-14 11:22:55 UTC (rev 25818)
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * 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.deltacloud.ui.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.jboss.tools.deltacloud.core.DeltaCloud;
+import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
+import org.jboss.tools.deltacloud.ui.views.CVCloudElement;
+import org.jboss.tools.deltacloud.ui.views.CVInstanceElement;
+import org.jboss.tools.deltacloud.ui.views.CVMessages;
+import org.jboss.tools.deltacloud.ui.views.CloudViewElement;
+import org.jboss.tools.deltacloud.ui.views.PerformInstanceActionThread;
+import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class StopInstanceHandler extends AbstractHandler implements IHandler {
+
+ private final static String STOPPING_INSTANCE_TITLE = "StoppingInstance.title"; //$NON-NLS-1$
+ private final static String STOPPING_INSTANCE_MSG = "StoppingInstance.msg"; //$NON-NLS-1$
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ ISelection selection = HandlerUtil.getCurrentSelection(event);
+ if (selection instanceof IStructuredSelection) {
+ CVInstanceElement cvInstance = UIUtils.getFirstElement(selection, CVInstanceElement.class);
+ stopInstance(cvInstance);
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ private void stopInstance(CVInstanceElement cvInstance) {
+ if (cvInstance != null) {
+ DeltaCloudInstance instance = (DeltaCloudInstance) cvInstance.getElement();
+ CloudViewElement element = cvInstance;
+ while (!(element instanceof CVCloudElement))
+ element = (CloudViewElement) element.getParent();
+ CVCloudElement cvcloud = (CVCloudElement) element;
+ DeltaCloud cloud = (DeltaCloud) cvcloud.getElement();
+ PerformInstanceActionThread t = new PerformInstanceActionThread(cloud, instance,
+ DeltaCloudInstance.STOP,
+ CVMessages.getString(STOPPING_INSTANCE_TITLE),
+ CVMessages.getFormattedString(STOPPING_INSTANCE_MSG, new String[] { instance.getName() }),
+ DeltaCloudInstance.STOPPED);
+ t.setUser(true);
+ t.schedule();
+ }
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/StopInstanceHandler.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/DeltaCloudView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/DeltaCloudView.java 2010-10-14 10:17:19 UTC (rev 25817)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/DeltaCloudView.java 2010-10-14 11:22:55 UTC (rev 25818)
@@ -62,18 +62,10 @@
private static final String REFRESH = "Refresh.label"; //$NON-NLS-1$
private static final String CREATE_INSTANCE = "CreateInstance.label"; //$NON-NLS-1$
- private final static String START_LABEL = "Start.label"; //$NON-NLS-1$
- private final static String STOP_LABEL = "Stop.label"; //$NON-NLS-1$
- private final static String REBOOT_LABEL = "Reboot.label"; //$NON-NLS-1$
- private final static String DESTROY_LABEL = "Destroy.label"; //$NON-NLS-1$
- private final static String STARTING_INSTANCE_TITLE = "StartingInstance.title"; //$NON-NLS-1$
- private final static String STARTING_INSTANCE_MSG = "StartingInstance.msg"; //$NON-NLS-1$
- private final static String STOPPING_INSTANCE_TITLE = "StoppingInstance.title"; //$NON-NLS-1$
- private final static String STOPPING_INSTANCE_MSG = "StoppingInstance.msg"; //$NON-NLS-1$
- private final static String REBOOTING_INSTANCE_TITLE = "RebootingInstance.title"; //$NON-NLS-1$
- private final static String REBOOTING_INSTANCE_MSG = "RebootingInstance.msg"; //$NON-NLS-1$
- private final static String DESTROYING_INSTANCE_TITLE = "DestroyingInstance.title"; //$NON-NLS-1$
- private final static String DESTROYING_INSTANCE_MSG = "DestroyingInstance.msg"; //$NON-NLS-1$
+// private final static String START_LABEL = "Start.label"; //$NON-NLS-1$
+// private final static String STOP_LABEL = "Stop.label"; //$NON-NLS-1$
+// private final static String REBOOT_LABEL = "Reboot.label"; //$NON-NLS-1$
+// private final static String DESTROY_LABEL = "Destroy.label"; //$NON-NLS-1$
private final static String IMAGE_FILTER = "ImageFilter.label"; //$NON-NLS-1$
private final static String INSTANCE_FILTER = "InstanceFilter.label"; //$NON-NLS-1$
public static final String COLLAPSE_ALL = "CollapseAll.label"; //$NON-NLS-1$
@@ -81,18 +73,11 @@
private TreeViewer viewer;
private Action refreshAction;
- private Action startAction;
- private Action stopAction;
- private Action rebootAction;
- private Action destroyAction;
private Action collapseall;
private Action doubleClickAction;
- private Action createInstance;
private Action imageFilterAction;
private Action instanceFilterAction;
- private Map<String, Action> instanceActions;
-
private CloudViewElement selectedElement;
/**
@@ -173,18 +158,6 @@
}
private void fillContextMenu(IMenuManager manager) {
- if (selectedElement instanceof CVImageElement) {
- manager.add(createInstance);
- } else if (selectedElement instanceof CVInstanceElement) {
- CVInstanceElement element = (CVInstanceElement) selectedElement;
- DeltaCloudInstance instance = (DeltaCloudInstance) element.getElement();
- List<String> actions = instance.getActions();
- for (String action : actions) {
- manager.add(instanceActions.get(action));
- }
- // manager.add(new
- // Separator(IWorkbenchActionConstants.MB_ADDITIONS));
- }
manager.add(imageFilterAction);
manager.add(instanceFilterAction);
// Other plug-ins can contribute there actions here
@@ -196,19 +169,12 @@
}
private void makeActions() {
- createInstance = createInstanceAction();
refreshAction = createRefreshAction();
- startAction = createStartAction();
- stopAction = createStopAction();
- rebootAction = createRebootAction();
- destroyAction = createDestroyAction();
+// startAction = createStartAction();
+// stopAction = createStopAction();
+// rebootAction = createRebootAction();
+// destroyAction = createDestroyAction();
- instanceActions = new HashMap<String, Action>();
- instanceActions.put(DeltaCloudInstance.START, startAction);
- instanceActions.put(DeltaCloudInstance.STOP, stopAction);
- instanceActions.put(DeltaCloudInstance.REBOOT, rebootAction);
- instanceActions.put(DeltaCloudInstance.DESTROY, destroyAction);
-
imageFilterAction = createImageFilterAction();
instanceFilterAction = createInstanceFilterAction();
@@ -301,127 +267,127 @@
return imageFilterAction;
}
- private Action createDestroyAction() {
- Action destroyAction = new Action() {
- public void run() {
- ISelection selection = viewer.getSelection();
- Object obj = ((IStructuredSelection) selection).getFirstElement();
- if (obj instanceof CVInstanceElement) {
- CVInstanceElement cvinstance = (CVInstanceElement) obj;
- DeltaCloudInstance instance = (DeltaCloudInstance) cvinstance.getElement();
- CloudViewElement element = (CloudViewElement) obj;
- while (!(element instanceof CVCloudElement))
- element = (CloudViewElement) element.getParent();
- CVCloudElement cvcloud = (CVCloudElement) element;
- DeltaCloud cloud = (DeltaCloud) cvcloud.getElement();
- PerformDestroyInstanceActionThread t = new PerformDestroyInstanceActionThread(cloud, instance,
- CVMessages.getString(DESTROYING_INSTANCE_TITLE),
- CVMessages.getFormattedString(DESTROYING_INSTANCE_MSG, new String[] { instance.getName() }));
- t.setUser(true);
- t.schedule();
- }
- }
- };
- destroyAction.setText(CVMessages.getString(DESTROY_LABEL));
- destroyAction.setToolTipText(CVMessages.getString(DESTROY_LABEL));
- ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
- ImageDescriptor delete = ImageDescriptor.createFromImage(sharedImages.getImage(ISharedImages.IMG_ETOOL_DELETE));
- ImageDescriptor delete_disabled = ImageDescriptor.createFromImage(sharedImages
- .getImage(ISharedImages.IMG_ETOOL_DELETE_DISABLED));
- destroyAction.setImageDescriptor(delete);
- destroyAction.setDisabledImageDescriptor(delete_disabled);
- return destroyAction;
- }
+// private Action createDestroyAction() {
+// Action destroyAction = new Action() {
+// public void run() {
+// ISelection selection = viewer.getSelection();
+// Object obj = ((IStructuredSelection) selection).getFirstElement();
+// if (obj instanceof CVInstanceElement) {
+// CVInstanceElement cvinstance = (CVInstanceElement) obj;
+// DeltaCloudInstance instance = (DeltaCloudInstance) cvinstance.getElement();
+// CloudViewElement element = (CloudViewElement) obj;
+// while (!(element instanceof CVCloudElement))
+// element = (CloudViewElement) element.getParent();
+// CVCloudElement cvcloud = (CVCloudElement) element;
+// DeltaCloud cloud = (DeltaCloud) cvcloud.getElement();
+// PerformDestroyInstanceActionThread t = new PerformDestroyInstanceActionThread(cloud, instance,
+// CVMessages.getString(DESTROYING_INSTANCE_TITLE),
+// CVMessages.getFormattedString(DESTROYING_INSTANCE_MSG, new String[] { instance.getName() }));
+// t.setUser(true);
+// t.schedule();
+// }
+// }
+// };
+// destroyAction.setText(CVMessages.getString(DESTROY_LABEL));
+// destroyAction.setToolTipText(CVMessages.getString(DESTROY_LABEL));
+// ISharedImages sharedImages = PlatformUI.getWorkbench().getSharedImages();
+// ImageDescriptor delete = ImageDescriptor.createFromImage(sharedImages.getImage(ISharedImages.IMG_ETOOL_DELETE));
+// ImageDescriptor delete_disabled = ImageDescriptor.createFromImage(sharedImages
+// .getImage(ISharedImages.IMG_ETOOL_DELETE_DISABLED));
+// destroyAction.setImageDescriptor(delete);
+// destroyAction.setDisabledImageDescriptor(delete_disabled);
+// return destroyAction;
+// }
- private Action createRebootAction() {
- Action rebootAction = new Action() {
- public void run() {
- ISelection selection = viewer.getSelection();
- Object obj = ((IStructuredSelection) selection).getFirstElement();
- if (obj instanceof CVInstanceElement) {
- CVInstanceElement cvinstance = (CVInstanceElement) obj;
- DeltaCloudInstance instance = (DeltaCloudInstance) cvinstance.getElement();
- CloudViewElement element = (CloudViewElement) obj;
- while (!(element instanceof CVCloudElement))
- element = (CloudViewElement) element.getParent();
- CVCloudElement cvcloud = (CVCloudElement) element;
- DeltaCloud cloud = (DeltaCloud) cvcloud.getElement();
- PerformInstanceActionThread t = new PerformInstanceActionThread(cloud, instance,
- DeltaCloudInstance.REBOOT,
- CVMessages.getString(REBOOTING_INSTANCE_TITLE),
- CVMessages.getFormattedString(REBOOTING_INSTANCE_MSG, new String[] { instance.getName() }),
- DeltaCloudInstance.RUNNING);
- t.setUser(true);
- t.schedule();
- }
- }
- };
- rebootAction.setText(CVMessages.getString(REBOOT_LABEL));
- rebootAction.setToolTipText(CVMessages.getString(REBOOT_LABEL));
- rebootAction.setImageDescriptor(SWTImagesFactory.DESC_REBOOT);
- rebootAction.setDisabledImageDescriptor(SWTImagesFactory.DESC_REBOOTD);
- return rebootAction;
- }
+// private Action createRebootAction() {
+// Action rebootAction = new Action() {
+// public void run() {
+// ISelection selection = viewer.getSelection();
+// Object obj = ((IStructuredSelection) selection).getFirstElement();
+// if (obj instanceof CVInstanceElement) {
+// CVInstanceElement cvinstance = (CVInstanceElement) obj;
+// DeltaCloudInstance instance = (DeltaCloudInstance) cvinstance.getElement();
+// CloudViewElement element = (CloudViewElement) obj;
+// while (!(element instanceof CVCloudElement))
+// element = (CloudViewElement) element.getParent();
+// CVCloudElement cvcloud = (CVCloudElement) element;
+// DeltaCloud cloud = (DeltaCloud) cvcloud.getElement();
+// PerformInstanceActionThread t = new PerformInstanceActionThread(cloud, instance,
+// DeltaCloudInstance.REBOOT,
+// CVMessages.getString(REBOOTING_INSTANCE_TITLE),
+// CVMessages.getFormattedString(REBOOTING_INSTANCE_MSG, new String[] { instance.getName() }),
+// DeltaCloudInstance.RUNNING);
+// t.setUser(true);
+// t.schedule();
+// }
+// }
+// };
+// rebootAction.setText(CVMessages.getString(REBOOT_LABEL));
+// rebootAction.setToolTipText(CVMessages.getString(REBOOT_LABEL));
+// rebootAction.setImageDescriptor(SWTImagesFactory.DESC_REBOOT);
+// rebootAction.setDisabledImageDescriptor(SWTImagesFactory.DESC_REBOOTD);
+// return rebootAction;
+// }
- private Action createStopAction() {
- Action stopAction = new Action() {
- public void run() {
- ISelection selection = viewer.getSelection();
- Object obj = ((IStructuredSelection) selection).getFirstElement();
- if (obj instanceof CVInstanceElement) {
- CVInstanceElement cvinstance = (CVInstanceElement) obj;
- DeltaCloudInstance instance = (DeltaCloudInstance) cvinstance.getElement();
- CloudViewElement element = (CloudViewElement) obj;
- while (!(element instanceof CVCloudElement))
- element = (CloudViewElement) element.getParent();
- CVCloudElement cvcloud = (CVCloudElement) element;
- DeltaCloud cloud = (DeltaCloud) cvcloud.getElement();
- PerformInstanceActionThread t = new PerformInstanceActionThread(cloud, instance,
- DeltaCloudInstance.STOP,
- CVMessages.getString(STOPPING_INSTANCE_TITLE),
- CVMessages.getFormattedString(STOPPING_INSTANCE_MSG, new String[] { instance.getName() }),
- DeltaCloudInstance.STOPPED);
- t.setUser(true);
- t.schedule();
- }
- }
- };
- stopAction.setText(CVMessages.getString(STOP_LABEL));
- stopAction.setToolTipText(CVMessages.getString(STOP_LABEL));
- stopAction.setImageDescriptor(SWTImagesFactory.DESC_STOP);
- stopAction.setDisabledImageDescriptor(SWTImagesFactory.DESC_STOPD);
- return stopAction;
- }
+// private Action createStopAction() {
+// Action stopAction = new Action() {
+// public void run() {
+// ISelection selection = viewer.getSelection();
+// Object obj = ((IStructuredSelection) selection).getFirstElement();
+// if (obj instanceof CVInstanceElement) {
+// CVInstanceElement cvinstance = (CVInstanceElement) obj;
+// DeltaCloudInstance instance = (DeltaCloudInstance) cvinstance.getElement();
+// CloudViewElement element = (CloudViewElement) obj;
+// while (!(element instanceof CVCloudElement))
+// element = (CloudViewElement) element.getParent();
+// CVCloudElement cvcloud = (CVCloudElement) element;
+// DeltaCloud cloud = (DeltaCloud) cvcloud.getElement();
+// PerformInstanceActionThread t = new PerformInstanceActionThread(cloud, instance,
+// DeltaCloudInstance.STOP,
+// CVMessages.getString(STOPPING_INSTANCE_TITLE),
+// CVMessages.getFormattedString(STOPPING_INSTANCE_MSG, new String[] { instance.getName() }),
+// DeltaCloudInstance.STOPPED);
+// t.setUser(true);
+// t.schedule();
+// }
+// }
+// };
+// stopAction.setText(CVMessages.getString(STOP_LABEL));
+// stopAction.setToolTipText(CVMessages.getString(STOP_LABEL));
+// stopAction.setImageDescriptor(SWTImagesFactory.DESC_STOP);
+// stopAction.setDisabledImageDescriptor(SWTImagesFactory.DESC_STOPD);
+// return stopAction;
+// }
- private Action createStartAction() {
- Action startAction = new Action() {
- public void run() {
- ISelection selection = viewer.getSelection();
- Object obj = ((IStructuredSelection) selection).getFirstElement();
- if (obj instanceof CVInstanceElement) {
- CVInstanceElement cvinstance = (CVInstanceElement) obj;
- DeltaCloudInstance instance = (DeltaCloudInstance) cvinstance.getElement();
- CloudViewElement element = (CloudViewElement) obj;
- while (!(element instanceof CVCloudElement))
- element = (CloudViewElement) element.getParent();
- CVCloudElement cvcloud = (CVCloudElement) element;
- DeltaCloud cloud = (DeltaCloud) cvcloud.getElement();
- PerformInstanceActionThread t = new PerformInstanceActionThread(cloud, instance,
- DeltaCloudInstance.START,
- CVMessages.getString(STARTING_INSTANCE_TITLE),
- CVMessages.getFormattedString(STARTING_INSTANCE_MSG, new String[] { instance.getName() }),
- DeltaCloudInstance.RUNNING);
- t.setUser(true);
- t.schedule();
- }
- }
- };
- startAction.setText(CVMessages.getString(START_LABEL));
- startAction.setToolTipText(CVMessages.getString(START_LABEL));
- startAction.setImageDescriptor(SWTImagesFactory.DESC_START);
- startAction.setDisabledImageDescriptor(SWTImagesFactory.DESC_STARTD);
- return startAction;
- }
+// private Action createStartAction() {
+// Action startAction = new Action() {
+// public void run() {
+// ISelection selection = viewer.getSelection();
+// Object obj = ((IStructuredSelection) selection).getFirstElement();
+// if (obj instanceof CVInstanceElement) {
+// CVInstanceElement cvinstance = (CVInstanceElement) obj;
+// DeltaCloudInstance instance = (DeltaCloudInstance) cvinstance.getElement();
+// CloudViewElement element = (CloudViewElement) obj;
+// while (!(element instanceof CVCloudElement))
+// element = (CloudViewElement) element.getParent();
+// CVCloudElement cvcloud = (CVCloudElement) element;
+// DeltaCloud cloud = (DeltaCloud) cvcloud.getElement();
+// PerformInstanceActionThread t = new PerformInstanceActionThread(cloud, instance,
+// DeltaCloudInstance.START,
+// CVMessages.getString(STARTING_INSTANCE_TITLE),
+// CVMessages.getFormattedString(STARTING_INSTANCE_MSG, new String[] { instance.getName() }),
+// DeltaCloudInstance.RUNNING);
+// t.setUser(true);
+// t.schedule();
+// }
+// }
+// };
+// startAction.setText(CVMessages.getString(START_LABEL));
+// startAction.setToolTipText(CVMessages.getString(START_LABEL));
+// startAction.setImageDescriptor(SWTImagesFactory.DESC_START);
+// startAction.setDisabledImageDescriptor(SWTImagesFactory.DESC_STARTD);
+// return startAction;
+// }
private Action createRefreshAction() {
Action refreshAction = new Action() {
@@ -501,30 +467,6 @@
// return removeCloud;
// }
- private Action createInstanceAction() {
- Action createInstance = new Action() {
- public void run() {
- ISelection selection = viewer.getSelection();
- Shell shell = viewer.getControl().getShell();
- Object obj = ((IStructuredSelection) selection).getFirstElement();
- if (obj instanceof CVImageElement) {
- CVImageElement imageElement = (CVImageElement) obj;
- DeltaCloudImage image = (DeltaCloudImage) imageElement.getElement();
- CVCategoryElement images = (CVCategoryElement) imageElement.getParent();
- CVCloudElement cloudElement = (CVCloudElement) images.getParent();
- DeltaCloud cloud = (DeltaCloud) cloudElement.getElement();
- IWizard wizard = new NewInstance(cloud, image);
- WizardDialog dialog = new WizardDialog(shell, wizard);
- dialog.create();
- dialog.open();
- }
- }
- };
- createInstance.setText(CVMessages.getString(CREATE_INSTANCE));
- createInstance.setToolTipText(CVMessages.getString(CREATE_INSTANCE));
- createInstance.setImageDescriptor(SWTImagesFactory.DESC_INSTANCE);
- return createInstance;
- }
private void hookDoubleClickAction() {
viewer.addDoubleClickListener(new IDoubleClickListener() {
14 years, 3 months
JBoss Tools SVN: r25817 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-14 06:17:19 -0400 (Thu, 14 Oct 2010)
New Revision: 25817
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java
Log:
[JBIDE-7332] corrected where the connection is get (was page name instead of connection name)
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java 2010-10-14 08:33:05 UTC (rev 25816)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnection.java 2010-10-14 10:17:19 UTC (rev 25817)
@@ -75,7 +75,7 @@
@Override
public boolean performFinish() {
- String name = mainPage.getName();
+ String name = mainPage.getModel().getName();
String url = mainPage.getModel().getUrl();
String username = mainPage.getModel().getUsername();
String password = mainPage.getModel().getPassword();
14 years, 3 months
JBoss Tools SVN: r25816 - trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2010-10-14 04:33:05 -0400 (Thu, 14 Oct 2010)
New Revision: 25816
Modified:
trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java
Log:
swtbot ext;reverted previously deleted method, now marked as deprecated
Modified: trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java
===================================================================
--- trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java 2010-10-14 08:17:44 UTC (rev 25815)
+++ trunk/tests/plugins/org.jboss.tools.ui.bot.ext/src/org/jboss/tools/ui/bot/ext/SWTJBTExt.java 2010-10-14 08:33:05 UTC (rev 25816)
@@ -52,10 +52,18 @@
* Dynamic version of isJBDSRun Method
* @return
*/
- public boolean isJBDSRun (){
+ public static boolean isJBDSRun (){
IProduct prod = Platform.getProduct();
return prod != null;
}
+ /*
+ *
+ * check if JBoss Developer Studio is running
+ */
+ @Deprecated
+ public static boolean isJBDSRun(SWTBot bot) {
+ return isJBDSRun();
+ }
/**
* Returns JBT version (taken from version of org.jboss.tools.common plugin version)
14 years, 3 months
JBoss Tools SVN: r25815 - trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-10-14 04:17:44 -0400 (Thu, 14 Oct 2010)
New Revision: 25815
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DisconnectCloudHandler.java
Log:
[JBIDE-7329] corrected return of wrong status
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DisconnectCloudHandler.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DisconnectCloudHandler.java 2010-10-14 03:52:59 UTC (rev 25814)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/commands/DisconnectCloudHandler.java 2010-10-14 08:17:44 UTC (rev 25815)
@@ -10,12 +10,11 @@
******************************************************************************/
package org.jboss.tools.deltacloud.ui.commands;
-import javax.net.ssl.SSLEngineResult.Status;
-
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
+import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -45,7 +44,7 @@
}
}
- return Status.OK;
+ return Status.OK_STATUS;
}
private void removeCloudViewElements(Object[] cloudViewerElements) {
14 years, 3 months
JBoss Tools SVN: r25814 - in trunk/deltacloud/docs/Cloud_Tools_Reference_Guide/en-US: images and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2010-10-13 23:52:59 -0400 (Wed, 13 Oct 2010)
New Revision: 25814
Added:
trunk/deltacloud/docs/Cloud_Tools_Reference_Guide/en-US/images/Preferences-Genearl-Network_Connections-SSH2.png
Modified:
trunk/deltacloud/docs/Cloud_Tools_Reference_Guide/en-US/using_the_deltacloud_perspective-task.xml
Log:
updated with new content from whats_new section of wiki
Added: trunk/deltacloud/docs/Cloud_Tools_Reference_Guide/en-US/images/Preferences-Genearl-Network_Connections-SSH2.png
===================================================================
(Binary files differ)
Property changes on: trunk/deltacloud/docs/Cloud_Tools_Reference_Guide/en-US/images/Preferences-Genearl-Network_Connections-SSH2.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/deltacloud/docs/Cloud_Tools_Reference_Guide/en-US/using_the_deltacloud_perspective-task.xml
===================================================================
--- trunk/deltacloud/docs/Cloud_Tools_Reference_Guide/en-US/using_the_deltacloud_perspective-task.xml 2010-10-13 22:29:35 UTC (rev 25813)
+++ trunk/deltacloud/docs/Cloud_Tools_Reference_Guide/en-US/using_the_deltacloud_perspective-task.xml 2010-10-14 03:52:59 UTC (rev 25814)
@@ -18,7 +18,7 @@
<title>Deltacloud perspective: The Cloud Viewer</title>
<mediaobject>
<imageobject>
- <imagedata fileref="images/Deltacloud-perspective-cloud-viewer.png"/>
+ <imagedata fileref="images/Deltacloud-perspective-cloud_viewer.png"/>
</imageobject>
</mediaobject>
</figure>
@@ -26,11 +26,75 @@
You can have multiple Deltacloud servers connected at any one time. If you have not yet setup a connection to a Deltacloud server see <xref linkend="sect-Cloud_Tools_Reference_Guide-Tasks-connecting_to_a_deltacloud_server"/>.
</para>
<formalpara>
+ <title>The Images view</title>
+ <para>
+ Displayed in the <guilabel>Images</guilabel> view is a table of all images for a specified cloud.
+ </para>
+ </formalpara>
+ <figure id="deltacloud_perspective-the_images_view">
+ <title>Deltacloud perspective: The Images view</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Deltacloud-images_view.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ By right-clicking on an image in the table and selecting <guimenuitem>Launch Instance</guimenuitem>, a dialog will appear. Define the <guilabel>Name</guilabel> of the instance, the <guilabel>Realm</guilabel> the instance should appear in, select a pre-defined <guilabel>Hardware Profile</guilabel> and choose a <guilabel>Key Name</guilabel> for key file authentication.
+ </para>
+ <para>
+ User authentication keys are managed for Deltacloud tooling by the <guilabel>Manage Keys</guilabel> dialog.
+ </para>
+ <para>
+ Click <guibutton>Finish</guibutton> to create the new instance.
+ </para>
+ <figure id="deltacloud_perspective-launching_an_instance">
+ <title>Deltacloud perspective: Launching an instance</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Deltacloud-perspective-launch_instance.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <formalpara>
<title>The Instances view</title>
<para>
-
+ Through the <guilabel>Instances</guilabel> view you can see all instances for a cloud server while having the functionality to start, stop and restart a selected instance.
</para>
</formalpara>
+ <figure id="deltacloud_perspective-the_instances_view">
+ <title>Deltacloud perspective: The Instances view</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Deltacloud-perspective-instances_view.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Using the <guilabel>Remote System Explorer</guilabel> you can connect to a running instance through the SSH protocol. Accessing a remote instance requires authentication; for an EC2 instance a PEM key file would be used.
+ </para>
+ <para>
+ Each unique user requires an individual key file and each file must be specified in the SSH2 private keys list prior to performing the ssh connection. To access the SSH2 private keys list navigate to <menuchoice><guimenuitem>Window</guimenuitem><guimenuitem>Preferences</guimenuitem><guimenuitem>General</guimenuitem><guimenuitem>Network Connections</guimenuitem><guimenuitem>SSH2</guimenuitem></menuchoice>.
+ </para>
+ <figure id="preferences-SSH2">
+ <title>Preferences: SSH2</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Preferences-Genearl-Network_Connections-SSH2.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <figure id="deltacloud_perspective-the_instances_view">
+ <title>Deltacloud perspective: The Instances view</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/Deltacloud-perspective-instances_view.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ Once connected files on the external instance can be manipulated as if they were on your local machine.
+ </para>
</section>
14 years, 3 months
JBoss Tools SVN: r25813 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui: src/org/jboss/tools/deltacloud/ui/views and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jjohnstn
Date: 2010-10-13 18:29:35 -0400 (Wed, 13 Oct 2010)
New Revision: 25813
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java
Log:
2010-10-13 Jeff Johnston <jjohnstn(a)redhat.com>
[JBIDE-7194]
* src/org/jboss/tools/deltacloud/ui/views/InstanceView.java: For RSE
action, add code to open the Remote Systems view. Do this in the case
where the connection is already in place.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-10-13 20:50:15 UTC (rev 25812)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/ChangeLog 2010-10-13 22:29:35 UTC (rev 25813)
@@ -1,3 +1,10 @@
+2010-10-13 Jeff Johnston <jjohnstn(a)redhat.com>
+
+ [JBIDE-7194]
+ * src/org/jboss/tools/deltacloud/ui/views/InstanceView.java: For RSE
+ action, add code to open the Remote Systems view. Do this in the case
+ where the connection is already in place.
+
2010-10-13 André Dietisheim <adietish(a)redhat.com>
* src/org/jboss/tools/deltacloud/ui/views/DeltaCloudView.java: [JBIDE-7326] implemented dialog to disconnect multiple cloud connections.
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java 2010-10-13 20:50:15 UTC (rev 25812)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/InstanceView.java 2010-10-13 22:29:35 UTC (rev 25813)
@@ -64,6 +64,7 @@
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.ISharedImages;
import org.eclipse.ui.IWorkbenchActionConstants;
+import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.ViewPart;
import org.jboss.tools.deltacloud.core.DeltaCloud;
@@ -508,6 +509,17 @@
protected IStatus run(IProgressMonitor monitor) {
try {
service.connect(monitor);
+ Display.getDefault().asyncExec(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.rse.ui.view.systemView");
+ } catch (PartInitException e) {
+ // TODO Auto-generated catch block
+ Activator.log(e);
+ }
+ }
+ });
return Status.OK_STATUS;
} catch(Exception e) {
return Status.CANCEL_STATUS;
@@ -517,6 +529,20 @@
connect.setUser(true);
connect.schedule();
}
+ } else {
+ // Assume failure is due to name already in use
+ Display.getDefault().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ try {
+ PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("org.eclipse.rse.ui.view.systemView");
+ } catch (PartInitException e) {
+ Activator.log(e);
+ }
+ }
+
+ });
}
} catch (Exception e) {
// TODO Auto-generated catch block
14 years, 3 months
JBoss Tools SVN: r25812 - in trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests: examples and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: lzoubek(a)redhat.com
Date: 2010-10-13 16:50:15 -0400 (Wed, 13 Oct 2010)
New Revision: 25812
Modified:
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/CreateRuntimeFromSOA.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInEAP.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInSOA.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java
trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorld.java
Log:
esb ui bot tests:fixed annotations to require server only in 'Present' state
Modified: trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/CreateRuntimeFromSOA.java
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/CreateRuntimeFromSOA.java 2010-10-13 19:44:25 UTC (rev 25811)
+++ trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/CreateRuntimeFromSOA.java 2010-10-13 20:50:15 UTC (rev 25812)
@@ -8,7 +8,7 @@
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.junit.Test;
-@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA))
+@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,state=ServerState.Present))
public class CreateRuntimeFromSOA extends SWTTestExt {
@Test
@@ -19,8 +19,9 @@
assertFalse("Finish button must not be enabled when no home dir is defined",bot.button(IDELabel.Button.FINISH).isEnabled());
bot.text(1).setText(TestConfigurator.currentConfig.getServer().runtimeHome);
assertTrue("Version was not automaticly selected by setting ESB home dir",bot.comboBox().selection().equals(configuredState.getServer().bundledESBVersion));
+ bot.text(0).setText("esb-runtime");
String name = bot.text(0).getText();
-// assertFalse("Runtime name was not automaticly set by setting ESB home dir",name.equals(""));
+ assertFalse("Runtime name was not automaticly set by setting ESB home dir",name.equals(""));
assertTrue("Finish button must be enabled when valid home dir is defined",bot.button(IDELabel.Button.FINISH).isEnabled());
open.finish(bot.activeShell().bot());
open.finish(wiz,IDELabel.Button.OK);
Modified: trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInEAP.java
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInEAP.java 2010-10-13 19:44:25 UTC (rev 25811)
+++ trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInEAP.java 2010-10-13 20:50:15 UTC (rev 25812)
@@ -18,7 +18,7 @@
* @author lzoubek
*
*/
-@SWTBotTestRequires(server=(a)Server(type=ServerType.EAP))
+@SWTBotTestRequires(server=(a)Server(type=ServerType.EAP,state=ServerState.Present))
public class NewProjectUsingBundledInEAP extends SWTTestExt {
@AfterClass
Modified: trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInSOA.java
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInSOA.java 2010-10-13 19:44:25 UTC (rev 25811)
+++ trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/NewProjectUsingBundledInSOA.java 2010-10-13 20:50:15 UTC (rev 25812)
@@ -8,7 +8,7 @@
import org.jboss.tools.ui.bot.ext.types.IDELabel;
import org.junit.Test;
-@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA))
+@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,state=ServerState.Present))
public class NewProjectUsingBundledInSOA extends SWTTestExt{
Modified: trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java 2010-10-13 19:44:25 UTC (rev 25811)
+++ trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/ESBExampleTest.java 2010-10-13 20:50:15 UTC (rev 25812)
@@ -37,6 +37,9 @@
if (configuredState.getServer().version.equals("5.0")) {
ret+="5.0";
}
+ if (configuredState.getServer().version.equals("5.1")) {
+ ret+="5.0";
+ }
else if (configuredState.getServer().version.equals("4.3")) {
ret+="4.3";
if (jbt.isJBDSRun()) {
Modified: trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorld.java
===================================================================
--- trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorld.java 2010-10-13 19:44:25 UTC (rev 25811)
+++ trunk/esb/tests/org.jboss.tools.esb.ui.bot.test/src/org/jboss/tools/esb/ui/bot/tests/examples/HelloWorld.java 2010-10-13 20:50:15 UTC (rev 25812)
@@ -17,7 +17,7 @@
import org.junit.AfterClass;
import org.junit.Test;
-@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,state=ServerState.NotRunning))
+@SWTBotTestRequires(server=(a)Server(type=ServerType.SOA,state=ServerState.Running))
public class HelloWorld extends ESBExampleTest {
String projectName="helloworld";
@@ -25,18 +25,14 @@
@AfterClass
public static void waitaminute() {
- //bot.sleep(Long.MAX_VALUE);
+ // bot.sleep(Long.MAX_VALUE);
}
@Test
public void helloWorldExample() {
String soaNode = getRunningSoaVersionTreeLabel();
assertNotNull("We are running on unexpected SOA-P version "+configuredState.getServer().version+" update test source code "+this.getClass().getName(), soaNode);
- if (jbt.isJBDSRun()) {
- createHelloWorldExample(soaNode, "JBoss ESB HelloWorld Example - ESB", "helloworld", "JBoss ESB HelloWorld Example - Client", "helloworld_testclient");
- }
- else {
- createHelloWorldExample(soaNode, "JBoss ESB HelloWorld Example - ESB", "helloworld", null, "helloworld_testclient");
- }
+ createHelloWorldExample(soaNode, "JBoss ESB HelloWorld Example - ESB", "helloworld", null, "helloworld_testclient");
+
}
/**
@@ -79,9 +75,11 @@
fixLibrary(projectClientName,"Server Library");
fixLibrary(projectName,"JBoss ESB Runtime");
fixLibrary(projectClientName,"JBoss ESB Runtime");
+ util.waitForNonIgnoredJobs();
SWTBotTreeItem errors = problems.getErrorsNode(bot);
- assertTrue("Project still contain problems :"+eclipse.getFormattedTreeNodesText(problems.show().bot().tree(), errors.getItems()),errors==null);
+ //assertTrue("Project still contain problems :"+eclipse.getFormattedTreeNodesText(problems.show().bot().tree(), errors.getItems()),errors==null);
packageExplorer.runOnServer(projectName);
+ util.waitForNonIgnoredJobs();
String text = console.getConsoleText();
SWTBotTreeItem jmsCall = SWTEclipseExt.selectTreeLocation(packageExplorer.show().bot(),projectClientName,"src","org.jboss.soa.esb.samples.quickstart.helloworld.test","SendJMSMessage.java");
eclipse.runTreeItemAsJavaApplication(jmsCall);
14 years, 3 months