JBoss Tools SVN: r27127 - trunk/jsf/plugins/org.jboss.tools.jsf.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-12-02 14:55:35 -0500 (Thu, 02 Dec 2010)
New Revision: 27127
Modified:
trunk/jsf/plugins/org.jboss.tools.jsf.ui/META-INF/MANIFEST.MF
Log:
use [3.6.0,4.0.0) instead of 3.6.0 for platform dep
Modified: trunk/jsf/plugins/org.jboss.tools.jsf.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/jsf/plugins/org.jboss.tools.jsf.ui/META-INF/MANIFEST.MF 2010-12-02 19:53:32 UTC (rev 27126)
+++ trunk/jsf/plugins/org.jboss.tools.jsf.ui/META-INF/MANIFEST.MF 2010-12-02 19:55:35 UTC (rev 27127)
@@ -54,7 +54,7 @@
org.eclipse.search;bundle-version="3.5.0",
org.jboss.tools.common.el.core,
org.eclipse.wst.html.ui;bundle-version="1.0.401",
- org.eclipse.pde.ui;bundle-version="3.6.0",
+ org.eclipse.pde.ui;bundle-version="[3.6.0,4.0.0)",
org.eclipse.jst.jsf.core,
org.eclipse.wst.common.project.facet.core
Bundle-Version: 3.2.0.qualifier
13 years, 6 months
JBoss Tools SVN: r27126 - trunk/vpe/plugins/org.jboss.tools.vpe.base.test/META-INF.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2010-12-02 14:53:32 -0500 (Thu, 02 Dec 2010)
New Revision: 27126
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.base.test/META-INF/MANIFEST.MF
Log:
use [3.6.0,4.0.0) instead of 3.6.0 for platform dep
Modified: trunk/vpe/plugins/org.jboss.tools.vpe.base.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/vpe/plugins/org.jboss.tools.vpe.base.test/META-INF/MANIFEST.MF 2010-12-02 19:50:18 UTC (rev 27125)
+++ trunk/vpe/plugins/org.jboss.tools.vpe.base.test/META-INF/MANIFEST.MF 2010-12-02 19:53:32 UTC (rev 27126)
@@ -7,7 +7,7 @@
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.eclipse.ui;bundle-version="[3.6.0,4.0.0)",
org.junit,
- org.eclipse.core.runtime;bundle-version="3.6.0",
+ org.eclipse.core.runtime;bundle-version="[3.6.0,4.0.0)",
org.jboss.tools.common;bundle-version="3.2.0",
org.eclipse.core.resources;bundle-version="[3.6.0,4.0.0)",
org.jboss.tools.tests;bundle-version="3.1.0",
13 years, 6 months
JBoss Tools SVN: r27125 - in trunk: jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-12-02 14:50:18 -0500 (Thu, 02 Dec 2010)
New Revision: 27125
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java
Log:
https://jira.jboss.org/browse/JBIDE-7674
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-12-02 18:37:50 UTC (rev 27124)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-12-02 19:50:18 UTC (rev 27125)
@@ -180,7 +180,8 @@
@Override
public void init(IProject project, ContextValidationHelper validationHelper, org.eclipse.wst.validation.internal.provisional.core.IValidator manager,
IReporter reporter) {
- super.init(project, validationHelper, manager, reporter, MESSAGE_ID_ATTRIBUTE_NAME);
+ super.init(project, validationHelper, manager, reporter);
+ setMessageIdQuickFixAttributeName(MESSAGE_ID_ATTRIBUTE_NAME);
if(projectSet==null) {
getValidatingProjects(project);
}
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-12-02 18:37:50 UTC (rev 27124)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java 2010-12-02 19:50:18 UTC (rev 27125)
@@ -81,7 +81,7 @@
}
public void init(IProject project, ContextValidationHelper validationHelper, IValidator manager, IReporter reporter, String messageIdQuickFixAttributeName) {
- init(project, validationHelper, manager, reporter);
+ this.init(project, validationHelper, manager, reporter);
setMessageIdQuickFixAttributeName(messageIdQuickFixAttributeName);
}
13 years, 6 months
JBoss Tools SVN: r27124 - trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-12-02 13:37:50 -0500 (Thu, 02 Dec 2010)
New Revision: 27124
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java
Log:
https://jira.jboss.org/browse/JBIDE-7674
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-12-02 18:37:16 UTC (rev 27123)
+++ trunk/jst/plugins/org.jboss.tools.jst.web.kb/src/org/jboss/tools/jst/web/kb/internal/validation/ValidationErrorManager.java 2010-12-02 18:37:50 UTC (rev 27124)
@@ -55,12 +55,22 @@
protected IValidationContext validationContext;
protected TextFileDocumentProvider documentProvider;
+ private String messageIdQuickFixAttributeName;
+
/**
* Constructor
*/
public ValidationErrorManager() {
}
+ /**
+ * @param messageIdQuickFixAttributeName the messageIdQuickFixAttributeName to set
+ */
+ public void setMessageIdQuickFixAttributeName(
+ String messageIdQuickFixAttributeName) {
+ this.messageIdQuickFixAttributeName = messageIdQuickFixAttributeName;
+ }
+
public void init(IProject project, ContextValidationHelper validationHelper, IValidator manager, IReporter reporter) {
setProject(project);
setCoreHelper(validationHelper);
@@ -70,6 +80,11 @@
setMarkerId(org.jboss.tools.jst.web.kb.validation.IValidator.MARKED_RESOURCE_MESSAGE_GROUP);
}
+ public void init(IProject project, ContextValidationHelper validationHelper, IValidator manager, IReporter reporter, String messageIdQuickFixAttributeName) {
+ init(project, validationHelper, manager, reporter);
+ setMessageIdQuickFixAttributeName(messageIdQuickFixAttributeName);
+ }
+
/**
* @param validationManager the validationManager to set
*/
@@ -243,8 +258,31 @@
}
/**
+ * Create a problem marker and add to the marker an attribute with the message ID for QuickFix.
*
* @param message
+ * @param preferenceKey
+ * @param location
+ * @param target
+ * @param messageId
+ * @return
+ */
+ public IMarker addError(String message, String preferenceKey,
+ ITextSourceReference location, IResource target, int messageId) {
+ IMarker marker = addError(message, preferenceKey, location, target);
+ try {
+ if(marker!=null) {
+ marker.setAttribute(messageIdQuickFixAttributeName, new Integer(messageId));
+ }
+ } catch(CoreException e) {
+ WebKbPlugin.getDefault().logError(e);
+ }
+ return marker;
+ }
+
+ /**
+ *
+ * @param message
* @param severity
* @param messageArguments
* @param length
13 years, 6 months
JBoss Tools SVN: r27123 - in trunk/cdi/plugins: org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: akazakov
Date: 2010-12-02 13:37:16 -0500 (Thu, 02 Dec 2010)
New Revision: 27123
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.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/marker/CDIProblemMarkerResolutionGenerator.java
Log:
https://jira.jboss.org/browse/JBIDE-7674
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-12-02 18:28:13 UTC (rev 27122)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDICoreValidator.java 2010-12-02 18:37:16 UTC (rev 27123)
@@ -22,7 +22,6 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspaceRoot;
@@ -105,12 +104,7 @@
public class CDICoreValidator extends CDIValidationErrorManager implements IValidator {
public static final String ID = "org.jboss.tools.cdi.core.CoreValidator"; //$NON-NLS-1$
public static final String PROBLEM_TYPE = "org.jboss.tools.cdi.core.cdiproblem"; //$NON-NLS-1$
-
- public static final String MESSAGE_ID_ATTRIBUTE_NAME = "CDI_message_id"; //$NON-NLS-1$
-
- public static final int ILLEGAL_PRODUCER_FIELD_IN_SESSION_BEAN_ID = 1;
-
ICDIProject cdiProject;
String projectName;
CDIProjectSet projectSet;
@@ -186,7 +180,7 @@
@Override
public void init(IProject project, ContextValidationHelper validationHelper, org.eclipse.wst.validation.internal.provisional.core.IValidator manager,
IReporter reporter) {
- super.init(project, validationHelper, manager, reporter);
+ super.init(project, validationHelper, manager, reporter, MESSAGE_ID_ATTRIBUTE_NAME);
if(projectSet==null) {
getValidatingProjects(project);
}
@@ -2191,18 +2185,4 @@
CDICorePlugin.getDefault().logError(e);
}
}
-
- public IMarker addError(String message, String preferenceKey,
- ITextSourceReference location, IResource target, int messageId) {
- IMarker marker = addError(message, preferenceKey, location, target);
- try{
- if(marker!=null) {
- marker.setAttribute(MESSAGE_ID_ATTRIBUTE_NAME, new Integer(messageId));
- }
- }catch(CoreException ex){
- CDICorePlugin.getDefault().logError(ex);
- }
- return marker;
- }
-
}
\ 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-12-02 18:28:13 UTC (rev 27122)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/validation/CDIValidationErrorManager.java 2010-12-02 18:37:16 UTC (rev 27123)
@@ -16,6 +16,10 @@
abstract public class CDIValidationErrorManager extends ValidationErrorManager {
+ public static final String MESSAGE_ID_ATTRIBUTE_NAME = "CDI_message_id"; //$NON-NLS-1$
+
+ public static final int ILLEGAL_PRODUCER_FIELD_IN_SESSION_BEAN_ID = 1;
+
/*
* (non-Javadoc)
* @see org.jboss.tools.jst.web.kb.internal.validation.ValidationErrorManager#getPreference(org.eclipse.core.resources.IProject, java.lang.String)
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2010-12-02 18:28:13 UTC (rev 27122)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/src/org/jboss/tools/cdi/ui/marker/CDIProblemMarkerResolutionGenerator.java 2010-12-02 18:37:16 UTC (rev 27123)
@@ -21,7 +21,7 @@
import org.eclipse.jdt.core.IType;
import org.eclipse.ui.IMarkerResolution;
import org.eclipse.ui.IMarkerResolutionGenerator2;
-import org.jboss.tools.cdi.internal.core.validation.CDICoreValidator;
+import org.jboss.tools.cdi.internal.core.validation.CDIValidationErrorManager;
import org.jboss.tools.cdi.ui.CDIUIPlugin;
import org.jboss.tools.common.EclipseUtil;
@@ -44,7 +44,7 @@
private IMarkerResolution[] findResolutions(IMarker marker)
throws CoreException {
Integer attribute = ((Integer) marker
- .getAttribute(CDICoreValidator.MESSAGE_ID_ATTRIBUTE_NAME));
+ .getAttribute(CDIValidationErrorManager.MESSAGE_ID_ATTRIBUTE_NAME));
if (attribute == null)
return new IMarkerResolution[] {};
@@ -63,7 +63,7 @@
int end = attribute.intValue();
if (JAVA_EXTENSION.equals(file.getFileExtension())) {
- if (messageId == CDICoreValidator.ILLEGAL_PRODUCER_FIELD_IN_SESSION_BEAN_ID) {
+ if (messageId == CDIValidationErrorManager.ILLEGAL_PRODUCER_FIELD_IN_SESSION_BEAN_ID) {
IField field = findNonStaticField(file, start);
if(field != null){
return new IMarkerResolution[] {
13 years, 6 months
JBoss Tools SVN: r27121 - in trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui: preferences and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2010-12-02 13:15:55 -0500 (Thu, 02 Dec 2010)
New Revision: 27121
Added:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/IPreferenceKeys.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/TextPreferenceValue.java
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java
Log:
cleanup
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/IPreferenceKeys.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/IPreferenceKeys.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/IPreferenceKeys.java 2010-12-02 18:15:55 UTC (rev 27121)
@@ -0,0 +1,17 @@
+/*******************************************************************************
+ * 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.internal.deltacloud.ui.preferences;
+
+public class IPreferenceKeys {
+
+ public static final String LAST_URL = "org.jboss.tools.internal.deltacloud.ui.wizards.LAST_CREATED_URL";
+
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/IPreferenceKeys.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/TextPreferenceValue.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/TextPreferenceValue.java (rev 0)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/TextPreferenceValue.java 2010-12-02 18:15:55 UTC (rev 27121)
@@ -0,0 +1,45 @@
+package org.jboss.tools.internal.deltacloud.ui.preferences;
+
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.osgi.service.prefs.BackingStoreException;
+import org.osgi.service.prefs.Preferences;
+
+public class TextPreferenceValue {
+
+ private Plugin plugin;
+ private String prefsKey;
+
+ public TextPreferenceValue(String prefsKey, Plugin plugin) {
+ this.plugin = plugin;
+ this.prefsKey = prefsKey;
+ }
+
+ public String get(String currentValue) {
+ if( currentValue == null || currentValue.equals("")) {
+ // pre-set with previously used
+ Preferences prefs = getPreferences();
+ return prefs.get(prefsKey, "");
+ } else {
+ return currentValue;
+ }
+ }
+
+ public void store(String value) {
+ Preferences prefs = getPreferences();
+ String prefsValue = prefs.get(prefsKey, "");
+ if (prefsValue == null || prefsValue.equals("") || !prefsValue.equals(value)) {
+ prefs.put(prefsKey, value);
+ try {
+ prefs.flush();
+ } catch (BackingStoreException bse) {
+ // intentionally ignore, non-critical
+ }
+ }
+
+ }
+
+ private Preferences getPreferences() {
+ return new InstanceScope().getNode(plugin.getBundle().getSymbolicName());
+ }
+}
Property changes on: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/preferences/TextPreferenceValue.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-12-02 18:14:15 UTC (rev 27120)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2010-12-02 18:15:55 UTC (rev 27121)
@@ -27,7 +27,6 @@
import org.eclipse.core.databinding.validation.ValidationStatus;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.databinding.fieldassist.ControlDecorationSupport;
import org.eclipse.jface.databinding.swt.ISWTObservableValue;
import org.eclipse.jface.databinding.swt.WidgetProperties;
@@ -63,7 +62,8 @@
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.CompositeValidator;
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.MandatoryStringValidator;
import org.jboss.tools.internal.deltacloud.ui.common.swt.JFaceUtils;
-import org.osgi.service.prefs.Preferences;
+import org.jboss.tools.internal.deltacloud.ui.preferences.IPreferenceKeys;
+import org.jboss.tools.internal.deltacloud.ui.preferences.TextPreferenceValue;
/**
* @author Jeff Jonhston
@@ -273,14 +273,14 @@
this.connectionModel = new CloudConnectionModel();
this.cloudConnection = cloudConnection;
}
-
- public CloudConnectionPage(String pageName, DeltaCloud initial, CloudConnection connection)
- throws MalformedURLException, DeltaCloudException {
+ public CloudConnectionPage(String pageName, DeltaCloud initial, CloudConnection connection)
+ throws MalformedURLException, DeltaCloudException {
+
this(pageName, initial.getName(), initial.getURL(), initial.getUsername(),
initial.getPassword(), initial.getType(), connection);
}
-
+
public CloudConnectionPage(String pageName, String defaultName, String defaultUrl,
String defaultUsername, String defaultPassword, String defaultType,
CloudConnection cloudConnection) throws MalformedURLException {
@@ -325,6 +325,10 @@
new UpdateValueStrategy().setAfterGetValidator(
new MandatoryStringValidator(WizardMessages.getString(MUST_ENTER_A_URL))), null);
+ String url = new TextPreferenceValue(IPreferenceKeys.LAST_URL, Activator.getDefault())
+ .get(urlText.getText());
+ urlText.setText(url);
+
// cloud type
Label typeLabel = new Label(container, SWT.NULL);
typeLabel.setText(WizardMessages.getString(CLOUDTYPE_LABEL));
@@ -451,12 +455,6 @@
f.top = new FormAttachment(passwordText, 5);
ec2pwLink.setLayoutData(f);
- if( urlText.getText().equals("")) {
- // pre-set with previously used
- Preferences prefs = new InstanceScope().getNode(Activator.PLUGIN_ID);
- String previousURL = prefs.get(NewCloudConnectionWizard.LAST_USED_URL, "");
- urlText.setText(previousURL);
- }
setControl(container);
}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java 2010-12-02 18:14:15 UTC (rev 27120)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java 2010-12-02 18:15:55 UTC (rev 27121)
@@ -12,7 +12,6 @@
import java.text.MessageFormat;
-import org.eclipse.core.runtime.preferences.InstanceScope;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.ui.INewWizard;
@@ -23,13 +22,12 @@
import org.jboss.tools.deltacloud.core.client.DeltaCloudClientImpl.DeltaCloudServerType;
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
+import org.jboss.tools.internal.deltacloud.ui.preferences.IPreferenceKeys;
+import org.jboss.tools.internal.deltacloud.ui.preferences.TextPreferenceValue;
public class NewCloudConnectionWizard extends Wizard implements INewWizard, CloudConnection {
private static final String MAINPAGE_NAME = "NewCloudConnection.name"; //$NON-NLS-1$
- public static final String LAST_USED_URL = "org.jboss.tools.internal.deltacloud.ui.wizards.LAST_CREATED_URL";
protected CloudConnectionPage mainPage;
protected DeltaCloud initialCloud;
private String pageTitle;
@@ -112,7 +110,10 @@
public boolean performFinish() {
String name = mainPage.getModel().getName();
String url = mainPage.getModel().getUrl();
- storeUrl(url);
+
+ new TextPreferenceValue(IPreferenceKeys.LAST_URL, Activator.getDefault())
+ .store(url);
+
String username = mainPage.getModel().getUsername();
String password = mainPage.getModel().getPassword();
String type = getServerType();
@@ -128,18 +129,4 @@
}
return true;
}
-
- private void storeUrl(String url) {
- // save URL in some plugin preference key!
- Preferences prefs = new InstanceScope().getNode(Activator.PLUGIN_ID);
- String previousURL = prefs.get(LAST_USED_URL, "");
- if (previousURL == null || previousURL.equals("") || !previousURL.equals(url)) {
- prefs.put(LAST_USED_URL, url);
- try {
- prefs.flush();
- } catch (BackingStoreException bse) {
- // intentionally ignore, non-critical
- }
- }
- }
}
13 years, 6 months
JBoss Tools SVN: r27120 - 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-12-02 13:14:15 -0500 (Thu, 02 Dec 2010)
New Revision: 27120
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage2.java
Log:
corrected warnings
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage2.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage2.java 2010-12-02 18:13:28 UTC (rev 27119)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstancePage2.java 2010-12-02 18:14:15 UTC (rev 27120)
@@ -103,7 +103,7 @@
private DeltaCloudHardwareProfile[] allProfiles;
private List<DeltaCloudRealm> realms;
- private Label dummyLabel, imageLabel, archLabel, nameLabel, realmLabel;
+ private Label imageLabel, archLabel, nameLabel, realmLabel;
private Group groupContainer;
@@ -318,7 +318,7 @@
layout.marginWidth = 5;
container.setLayout(layout);
- dummyLabel = new Label(container, SWT.NULL);
+ Label dummyLabel = new Label(container, SWT.NULL);
imageLabel = new Label(container, SWT.NULL);
imageLabel.setText(WizardMessages.getString(IMAGE_LABEL));
@@ -361,7 +361,7 @@
hardware.setEnabled(false);
// add invisible dummy widget to guarantee a min size
- Label dummyLabel = new Label(groupContainer, SWT.NONE);
+ dummyLabel = new Label(groupContainer, SWT.NONE);
dummyLabel.setText("\n\n\n\n\n");
FormData dummyData = UIUtils.createFormData(0,0,0,150,null,0,null,0);
dummyLabel.setLayoutData(dummyData);
13 years, 6 months
JBoss Tools SVN: r27119 - 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-12-02 13:13:28 -0500 (Thu, 02 Dec 2010)
New Revision: 27119
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard2.java
Log:
corrected warnings
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard2.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard2.java 2010-12-02 17:25:00 UTC (rev 27118)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewInstanceWizard2.java 2010-12-02 18:13:28 UTC (rev 27119)
@@ -37,7 +37,6 @@
private final static String CREATE_INSTANCE_FAILURE_TITLE = "CreateInstanceError.title"; //$NON-NLS-1$
private final static String CREATE_INSTANCE_FAILURE_MSG = "CreateInstanceError.msg"; //$NON-NLS-1$
- private final static String DEFAULT_REASON = "CreateInstanceErrorReason.msg"; //$NON-NLS-1$
private final static String CONFIRM_CREATE_TITLE = "ConfirmCreate.title"; //$NON-NLS-1$
private final static String CONFIRM_CREATE_MSG = "ConfirmCreate.msg"; //$NON-NLS-1$
private final static String DONT_SHOW_THIS_AGAIN_MSG = "DontShowThisAgain.msg"; //$NON-NLS-1$
@@ -151,7 +150,6 @@
boolean result = false;
Exception e = null;
- String errorMessage = WizardMessages.getString(DEFAULT_REASON);
try {
DeltaCloudManager.getDefault().saveClouds();
boolean dontShowDialog = prefs.getBoolean(IDeltaCloudPreferenceConstants.DONT_CONFIRM_CREATE_INSTANCE,
@@ -185,7 +183,6 @@
job.schedule();
}
} catch (DeltaCloudException ex) {
- errorMessage = ex.getLocalizedMessage();
e = ex;
}
if (!result) {
13 years, 6 months
JBoss Tools SVN: r27118 - in trunk/cdi: tests/org.jboss.tools.cdi.core.test/META-INF and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: dazarov
Date: 2010-12-02 12:25:00 -0500 (Thu, 02 Dec 2010)
New Revision: 27118
Added:
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF
trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
Log:
https://jira.jboss.org/browse/JBIDE-7674
Modified: trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF 2010-12-02 16:58:19 UTC (rev 27117)
+++ trunk/cdi/plugins/org.jboss.tools.cdi.ui/META-INF/MANIFEST.MF 2010-12-02 17:25:00 UTC (rev 27118)
@@ -34,5 +34,6 @@
Bundle-Vendor: %Bundle-Vendor.0
Export-Package: org.jboss.tools.cdi.ui,
org.jboss.tools.cdi.ui.ca,
+ org.jboss.tools.cdi.ui.marker,
org.jboss.tools.cdi.ui.preferences,
org.jboss.tools.cdi.ui.wizard
Modified: trunk/cdi/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF 2010-12-02 16:58:19 UTC (rev 27117)
+++ trunk/cdi/tests/org.jboss.tools.cdi.core.test/META-INF/MANIFEST.MF 2010-12-02 17:25:00 UTC (rev 27118)
@@ -20,4 +20,5 @@
org.jboss.tools.cdi.xml,
org.eclipse.jst.standard.schemas
Export-Package: org.jboss.tools.cdi.core.test,
- org.jboss.tools.cdi.core.test.tck
+ org.jboss.tools.cdi.core.test.tck,
+ org.jboss.tools.cdi.core.test.tck.validation
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF 2010-12-02 16:58:19 UTC (rev 27117)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/META-INF/MANIFEST.MF 2010-12-02 17:25:00 UTC (rev 27118)
@@ -18,5 +18,6 @@
org.eclipse.jface,
org.eclipse.jface.text;bundle-version="3.5.2",
org.eclipse.jdt.core;bundle-version="3.5.2",
- org.eclipse.jdt.ui
+ org.eclipse.jdt.ui,
+ org.eclipse.ui.ide;bundle-version="3.6.0"
Export-Package: org.jboss.tools.cdi.ui.test
Modified: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2010-12-02 16:58:19 UTC (rev 27117)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/CDIUIAllTests.java 2010-12-02 17:25:00 UTC (rev 27118)
@@ -11,6 +11,7 @@
package org.jboss.tools.cdi.ui.test;
import org.eclipse.jdt.internal.core.JavaModelManager;
+import org.jboss.tools.cdi.ui.test.marker.CDIMarkerResolutionTest;
import org.jboss.tools.cdi.ui.test.references.CDIPreferencePageTest;
import org.jboss.tools.cdi.ui.test.wizard.NewCDIWizardTest;
@@ -27,9 +28,11 @@
JavaModelManager.getIndexManager().disable();
TestSuite suite = new TestSuite("CDI UI Tests");
+ suite.addTestSuite(CDIMarkerResolutionTest.class);
suite.addTestSuite(CATest.class);
suite.addTestSuite(NewCDIWizardTest.class);
suite.addTestSuite(CDIPreferencePageTest.class);
+
return suite;
}
}
\ No newline at end of file
Added: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
===================================================================
--- trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java (rev 0)
+++ trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java 2010-12-02 17:25:00 UTC (rev 27118)
@@ -0,0 +1,57 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2009 JBoss by Red Hat and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
+package org.jboss.tools.cdi.ui.test.marker;
+
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.ui.IMarkerResolution;
+import org.eclipse.ui.ide.IDE;
+import org.jboss.tools.cdi.core.test.tck.validation.ValidationTest;
+import org.jboss.tools.cdi.ui.marker.MakeFieldStaticMarkerResolution;
+
+/**
+ * @author Daniel Azarov
+ *
+ */
+public class CDIMarkerResolutionTest extends ValidationTest {
+ public static final String MARKER_TYPE = "org.jboss.tools.cdi.core.cdiproblem";
+
+ public void testMakeFieldStaticResolution() throws CoreException {
+ IFile file = tckProject.getFile("JavaSource/org/jboss/jsr299/tck/tests/jbt/validation/producers/NonStaticProducerOfSessionBeanBroken.java");
+
+ assertTrue("File - "+file.getFullPath()+" must be exist",file.exists());
+
+ IMarker[] markers = file.findMarkers(MARKER_TYPE, true, IResource.DEPTH_INFINITE);
+
+ boolean found = false;
+ for (int i = 0; i < markers.length; i++) {
+ IMarker marker = markers[i];
+ IMarkerResolution[] resolutions = IDE.getMarkerHelpRegistry()
+ .getResolutions(marker);
+ for (int j = 0; j < resolutions.length; j++) {
+ IMarkerResolution resolution = resolutions[j];
+ if (resolution instanceof MakeFieldStaticMarkerResolution) {
+ found = true;
+ break;
+ }
+ }
+ if (found) {
+ break;
+ }
+ }
+ assertTrue("Quick fix: \"Make field static\" doesn't exist.", found);
+ }
+
+
+}
Property changes on: trunk/cdi/tests/org.jboss.tools.cdi.ui.test/src/org/jboss/tools/cdi/ui/test/marker/CDIMarkerResolutionTest.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
13 years, 6 months