JBoss Tools SVN: r35271 - trunk/as/plugins/org.jboss.ide.eclipse.as.core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-10-03 05:53:27 -0400 (Mon, 03 Oct 2011)
New Revision: 35271
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
JBIDE-9788 - EAP 6 aren't usable as runtimes
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2011-10-03 09:49:53 UTC (rev 35270)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2011-10-03 09:53:27 UTC (rev 35271)
@@ -901,6 +901,10 @@
runtimeTypeId="org.jboss.ide.eclipse.as.runtime.eap.50"
runtime-component="org.jboss.ide.eclipse.eap.runtime.component"
version="5.0"/>
+ <runtimeFacetMapping
+ runtimeTypeId="org.jboss.ide.eclipse.as.runtime.eap.60"
+ runtime-component="org.jboss.ide.eclipse.eap.runtime.component"
+ version="6.0"/>
</extension>
@@ -934,6 +938,9 @@
<runtime-component-version
type="org.jboss.ide.eclipse.eap.runtime.component"
version="5.0"/>
+ <runtime-component-version
+ type="org.jboss.ide.eclipse.eap.runtime.component"
+ version="6.0"/>
<supported>
<runtime-component
id="org.jboss.ide.eclipse.eap.runtime.component"
@@ -960,6 +967,19 @@
<facet id="jst.ear" version="1.2,1.3,1.4,5.0"/>
<facet id="jst.appclient" version="1.2,1.3,1.4,5.0"/>
</supported>
+ <supported>
+ <runtime-component
+ id="org.jboss.ide.eclipse.eap.runtime.component"
+ version="6.0"/>
+ <facet id="wst.web" version="1.0,1.2,1.3,1.4"/>
+ <facet id="jst.web" version="2.2,2.3,2.4,2.5,3.0"/>
+ <facet id="jst.java" version="5.0,6.0,1.7"/>
+ <facet id="jst.utility" version="1.0"/>
+ <facet id="jst.connector" version="1.0,1.5,1.6"/>
+ <facet id="jst.ejb" version="2.0,2.1,3.0,3.1"/>
+ <facet id="jst.ear" version="1.2,1.3,1.4,5.0,6.0"/>
+ <facet id="jst.appclient" version="1.2,1.3,1.4,5.0,6.0"/>
+ </supported>
</extension>
<extension
13 years, 2 months
JBoss Tools SVN: r35270 - in trunk: common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui and 8 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-03 05:49:53 -0400 (Mon, 03 Oct 2011)
New Revision: 35270
Added:
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferencevalue/
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferencevalue/AbstractPreferenceValue.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferencevalue/StringPreferenceValue.java
trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferencevalue/StringsPreferenceValue.java
Removed:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/preferences/AbstractPreferenceValue.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/preferences/StringPreferenceValue.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/preferences/StringsPreferenceValue.java
Modified:
trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/META-INF/MANIFEST.MF
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/RSEandASWizardPage.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/UIUtils.java
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/EditCloudConnectionWizard.java
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/SshPrivateKeysPreferences.java
Log:
[JBIDE-9805] moved StringPreferenceValue etc. to org.jboss.tools.common.ui
Modified: trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF 2011-10-03 09:42:59 UTC (rev 35269)
+++ trunk/common/plugins/org.jboss.tools.common.ui/META-INF/MANIFEST.MF 2011-10-03 09:49:53 UTC (rev 35270)
@@ -20,6 +20,7 @@
Export-Package: org.jboss.tools.common.ui,
org.jboss.tools.common.ui.databinding,
org.jboss.tools.common.ui.preferences,
+ org.jboss.tools.common.ui.preferencevalue,
org.jboss.tools.common.ui.widget.editor,
org.jboss.tools.common.ui.widget.field,
org.jboss.tools.common.ui.wizard
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferencevalue/AbstractPreferenceValue.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferencevalue/AbstractPreferenceValue.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferencevalue/AbstractPreferenceValue.java 2011-10-03 09:49:53 UTC (rev 35270)
@@ -0,0 +1,77 @@
+/*******************************************************************************
+ * 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.common.ui.preferencevalue;
+
+import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.osgi.service.prefs.BackingStoreException;
+import org.osgi.service.prefs.Preferences;
+
+/**
+ * @author Andre Dietisheim
+ */
+public abstract class AbstractPreferenceValue<TYPE> {
+
+ private String pluginId;
+ private String prefsKey;
+
+ public AbstractPreferenceValue(String prefsKey, String pluginId) {
+ this.pluginId = pluginId;
+ this.prefsKey = prefsKey;
+ }
+
+ public abstract TYPE get();
+
+ protected String doGet() {
+ return doGet(null);
+ }
+
+ public abstract TYPE get(TYPE currentValue);
+
+ protected String doGet(String currentValue) {
+ if( currentValue == null || currentValue.equals("")) {
+ // pre-set with previously used
+ Preferences prefs = getPreferences(this.pluginId);
+ return prefs.get(prefsKey, "");
+ } else {
+ return currentValue;
+ }
+ }
+
+ public void remove() {
+ String prefsValue = doGet();
+ if (prefsValue == null
+ || prefsValue == null) {
+ return;
+ }
+ store(null);
+ }
+
+ public abstract void store(TYPE value);
+
+ protected void doStore(String value) {
+ Preferences prefs = getPreferences(this.pluginId);
+ 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
+ }
+ }
+ }
+
+ protected Preferences getPreferences(String pluginId) {
+ return InstanceScope.INSTANCE.getNode(pluginId);
+ }
+}
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferencevalue/StringPreferenceValue.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferencevalue/StringPreferenceValue.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferencevalue/StringPreferenceValue.java 2011-10-03 09:49:53 UTC (rev 35270)
@@ -0,0 +1,33 @@
+/*******************************************************************************
+ * 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.common.ui.preferencevalue;
+
+/**
+ * @author Andre Dietisheim
+ */
+public class StringPreferenceValue extends AbstractPreferenceValue<String> {
+
+ public StringPreferenceValue(String prefsKey, String pluginId) {
+ super(prefsKey, pluginId);
+ }
+
+ public String get() {
+ return get(null);
+ }
+
+ public String get(String currentValue) {
+ return doGet(currentValue);
+ }
+
+ public void store(String value) {
+ doStore(value);
+ }
+}
Added: trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferencevalue/StringsPreferenceValue.java
===================================================================
--- trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferencevalue/StringsPreferenceValue.java (rev 0)
+++ trunk/common/plugins/org.jboss.tools.common.ui/src/org/jboss/tools/common/ui/preferencevalue/StringsPreferenceValue.java 2011-10-03 09:49:53 UTC (rev 35270)
@@ -0,0 +1,189 @@
+/*******************************************************************************
+ * 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.common.ui.preferencevalue;
+
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.ArrayList;
+import java.util.StringTokenizer;
+
+
+/**
+ * A class that offers access to a collection of values that is stored in the
+ * preferences under a single key.
+ *
+ * @author Andre Dietisheim
+ */
+public class StringsPreferenceValue extends AbstractPreferenceValue<String[]> {
+
+ private String delimiter;
+ private String escapedDelimiter;
+
+ public StringsPreferenceValue(char delimiter, String prefsKey, String pluginId) {
+ super(prefsKey, pluginId);
+ this.delimiter = String.valueOf(delimiter);
+ try {
+ this.escapedDelimiter = URLEncoder.encode(String.valueOf(delimiter), "UTF-8");
+ } catch (UnsupportedEncodingException e) {
+ // cannot happen since we use a fixed, known encoding
+ }
+ }
+
+ public String[] get() {
+ return get(null);
+ }
+
+ public String[] get(String[] currentValues) {
+
+ String string = doGet(null);
+ String[] prefValues = split(string);
+ return overrideValues(currentValues, prefValues);
+ }
+
+ private String[] split(String string) {
+ ArrayList<String> values = new ArrayList<String>();
+ StringTokenizer tokenizer = new StringTokenizer(string, delimiter);
+ while (tokenizer.hasMoreTokens()) {
+ String value = tokenizer.nextToken();
+ String unescapedValue = unescapeDelimiterCharacter(value);
+ values.add(unescapedValue);
+ }
+ return values.toArray(new String[values.size()]);
+ }
+
+ private String[] overrideValues(String[] newValues, String[] prefValues) {
+ if (prefValues == null) {
+ return newValues;
+ }
+
+ for (int i = 0; i < prefValues.length; i++) {
+ if (newValues == null
+ || newValues.length < i) {
+ break;
+ }
+ prefValues[i] = newValues[i];
+ }
+ return prefValues;
+ }
+
+ /**
+ * Adds the given string value to this preference value(s). Duplicate values
+ * are not added.
+ *
+ * @param value
+ * the value to add
+ */
+ public void add(String value) {
+ String currentValues = doGet();
+ StringBuilder builder = new StringBuilder(currentValues);
+ value = escapeDelimiterCharacter(value);
+ if (!contains(value, currentValues)) {
+ if (hasValues(currentValues)) {
+ builder.append(delimiter);
+ }
+ builder.append(value);
+ doStore(builder.toString());
+ }
+ }
+
+ private String escapeDelimiterCharacter(String value) {
+ if (value == null || value.length() == 0) {
+ return value;
+ }
+
+ int index = value.indexOf(delimiter);
+ if (index < 0) {
+ return value;
+ }
+ StringBuilder builder = new StringBuilder(value.substring(0, index));
+ builder.append(escapedDelimiter);
+ builder.append(value.substring(index + 1));
+ return builder.toString();
+ }
+
+ private String unescapeDelimiterCharacter(String value) {
+ if (value == null || value.length() == 0) {
+ return value;
+ }
+
+ int index = value.indexOf(escapedDelimiter);
+ if (index < 0) {
+ return value;
+ }
+ StringBuilder builder = new StringBuilder(value.substring(0, index));
+ builder.append(delimiter);
+ builder.append(value.substring(index + 1));
+ return builder.toString();
+ }
+
+ private boolean contains(String value, String currentValues) {
+ return currentValues != null
+ && currentValues.length() > 0
+ && currentValues.indexOf(value) >= 0;
+ }
+
+ private boolean hasValues(String currentValues) {
+ return currentValues != null && currentValues.length() > 0;
+ }
+
+ /**
+ * Removes the given values from the strings stored in the preferences and
+ * stores the preferences.
+ *
+ * @param values
+ * the values
+ */
+ public void remove(String... valuesToRemove) {
+ boolean removed = false;
+ String[] currentValues = get();
+ if (valuesToRemove != null) {
+ for (int i = 0; i < currentValues.length; i++) {
+ for (String valueToRemove : valuesToRemove) {
+ if (valueToRemove.equals(currentValues[i])) {
+ currentValues[i] = null;
+ removed = true;
+ }
+ }
+ }
+ }
+ if (removed) {
+ store(currentValues);
+ }
+ }
+
+ /**
+ * Overrides the current values in the preferences with the values in the
+ * given array (value in the preferences at index x is overridden with the
+ * value in the given array at index x) and stores the preferences.
+ */
+ public void store(String[] newValues) {
+ String[] currentValues = get();
+ overrideValues(newValues, currentValues);
+ doStore(concatenate(currentValues));
+ }
+
+ public void store() {
+ store(null);
+ }
+
+ protected String concatenate(String[] values) {
+ StringBuilder builder = new StringBuilder();
+ for (int i = 0; i < values.length; i++) {
+ if (values[i] != null) {
+ if (builder.length() > 0) {
+ builder.append(delimiter);
+ }
+ builder.append(values[i]);
+ }
+ }
+ return builder.toString();
+ }
+}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/META-INF/MANIFEST.MF 2011-10-03 09:42:59 UTC (rev 35269)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/META-INF/MANIFEST.MF 2011-10-03 09:49:53 UTC (rev 35270)
@@ -29,3 +29,4 @@
org.eclipse.wst.server.ui;bundle-version="1.1.305",
org.eclipse.jsch.core;bundle-version="1.1.300",
com.jcraft.jsch;bundle-version="0.1.41"
+Import-Package: org.jboss.tools.common.ui.preferencevalue
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/RSEandASWizardPage.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/RSEandASWizardPage.java 2011-10-03 09:42:59 UTC (rev 35269)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/wizard/RSEandASWizardPage.java 2011-10-03 09:49:53 UTC (rev 35270)
@@ -37,9 +37,9 @@
import org.eclipse.wst.server.ui.ServerUIUtil;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.tools.common.jobs.ChainedJob;
+import org.jboss.tools.common.ui.preferencevalue.StringPreferenceValue;
import org.jboss.tools.deltacloud.core.DeltaCloudInstance;
import org.jboss.tools.deltacloud.integration.DeltaCloudIntegrationPlugin;
-import org.jboss.tools.deltacloud.ui.preferences.StringPreferenceValue;
import org.jboss.tools.deltacloud.ui.wizard.INewInstanceWizardPage;
import org.jboss.tools.internal.deltacloud.ui.utils.LayoutUtils;
import org.jboss.tools.internal.deltacloud.ui.utils.UIUtils;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2011-10-03 09:42:59 UTC (rev 35269)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/META-INF/MANIFEST.MF 2011-10-03 09:49:53 UTC (rev 35270)
@@ -30,4 +30,5 @@
org.jboss.tools.deltacloud.ui.wizard,
org.jboss.tools.internal.deltacloud.ui.utils;x-friends:="org.jboss.tools.deltacloud.test,org.jboss.tools.deltacloud.integration"
Import-Package: org.jboss.tools.common.ui,
- org.jboss.tools.common.ui.databinding
+ org.jboss.tools.common.ui.databinding,
+ org.jboss.tools.common.ui.preferencevalue
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/preferences/AbstractPreferenceValue.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/preferences/AbstractPreferenceValue.java 2011-10-03 09:42:59 UTC (rev 35269)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/preferences/AbstractPreferenceValue.java 2011-10-03 09:49:53 UTC (rev 35270)
@@ -1,77 +0,0 @@
-/*******************************************************************************
- * 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.preferences;
-
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.osgi.service.prefs.BackingStoreException;
-import org.osgi.service.prefs.Preferences;
-
-/**
- * @author Andre Dietisheim
- */
-public abstract class AbstractPreferenceValue<TYPE> {
-
- private String pluginId;
- private String prefsKey;
-
- public AbstractPreferenceValue(String prefsKey, String pluginId) {
- this.pluginId = pluginId;
- this.prefsKey = prefsKey;
- }
-
- public abstract TYPE get();
-
- protected String doGet() {
- return doGet(null);
- }
-
- public abstract TYPE get(TYPE currentValue);
-
- protected String doGet(String currentValue) {
- if( currentValue == null || currentValue.equals("")) {
- // pre-set with previously used
- Preferences prefs = getPreferences(this.pluginId);
- return prefs.get(prefsKey, "");
- } else {
- return currentValue;
- }
- }
-
- public void remove() {
- String prefsValue = doGet();
- if (prefsValue == null
- || prefsValue == null) {
- return;
- }
- store(null);
- }
-
- public abstract void store(TYPE value);
-
- protected void doStore(String value) {
- Preferences prefs = getPreferences(this.pluginId);
- 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
- }
- }
- }
-
- protected Preferences getPreferences(String pluginId) {
- return new InstanceScope().getNode(pluginId);
- }
-}
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/preferences/StringPreferenceValue.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/preferences/StringPreferenceValue.java 2011-10-03 09:42:59 UTC (rev 35269)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/preferences/StringPreferenceValue.java 2011-10-03 09:49:53 UTC (rev 35270)
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * 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.preferences;
-
-
-
-/**
- * @author Andre Dietisheim
- */
-public class StringPreferenceValue extends AbstractPreferenceValue<String> {
-
- public StringPreferenceValue(String prefsKey, String pluginId) {
- super(prefsKey, pluginId);
- }
-
- public String get() {
- return get(null);
- }
-
- public String get(String currentValue) {
- return doGet(currentValue);
- }
-
- public void store(String value) {
- doStore(value);
- }
-}
Deleted: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/preferences/StringsPreferenceValue.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/preferences/StringsPreferenceValue.java 2011-10-03 09:42:59 UTC (rev 35269)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/preferences/StringsPreferenceValue.java 2011-10-03 09:49:53 UTC (rev 35270)
@@ -1,189 +0,0 @@
-/*******************************************************************************
- * 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.preferences;
-
-import java.io.UnsupportedEncodingException;
-import java.net.URLEncoder;
-import java.util.ArrayList;
-import java.util.StringTokenizer;
-
-
-/**
- * A class that offers access to a collection of values that is stored in the
- * preferences under a single key.
- *
- * @author Andre Dietisheim
- */
-public class StringsPreferenceValue extends AbstractPreferenceValue<String[]> {
-
- private String delimiter;
- private String escapedDelimiter;
-
- public StringsPreferenceValue(char delimiter, String prefsKey, String pluginId) {
- super(prefsKey, pluginId);
- this.delimiter = String.valueOf(delimiter);
- try {
- this.escapedDelimiter = URLEncoder.encode(String.valueOf(delimiter), "UTF-8");
- } catch (UnsupportedEncodingException e) {
- // cannot happen since we use a fixed, known encoding
- }
- }
-
- public String[] get() {
- return get(null);
- }
-
- public String[] get(String[] currentValues) {
-
- String string = doGet(null);
- String[] prefValues = split(string);
- return overrideValues(currentValues, prefValues);
- }
-
- private String[] split(String string) {
- ArrayList<String> values = new ArrayList<String>();
- StringTokenizer tokenizer = new StringTokenizer(string, delimiter);
- while (tokenizer.hasMoreTokens()) {
- String value = tokenizer.nextToken();
- String unescapedValue = unescapeDelimiterCharacter(value);
- values.add(unescapedValue);
- }
- return values.toArray(new String[values.size()]);
- }
-
- private String[] overrideValues(String[] newValues, String[] prefValues) {
- if (prefValues == null) {
- return newValues;
- }
-
- for (int i = 0; i < prefValues.length; i++) {
- if (newValues == null
- || newValues.length < i) {
- break;
- }
- prefValues[i] = newValues[i];
- }
- return prefValues;
- }
-
- /**
- * Adds the given string value to this preference value(s). Duplicate values
- * are not added.
- *
- * @param value
- * the value to add
- */
- public void add(String value) {
- String currentValues = doGet();
- StringBuilder builder = new StringBuilder(currentValues);
- value = escapeDelimiterCharacter(value);
- if (!contains(value, currentValues)) {
- if (hasValues(currentValues)) {
- builder.append(delimiter);
- }
- builder.append(value);
- doStore(builder.toString());
- }
- }
-
- private String escapeDelimiterCharacter(String value) {
- if (value == null || value.length() == 0) {
- return value;
- }
-
- int index = value.indexOf(delimiter);
- if (index < 0) {
- return value;
- }
- StringBuilder builder = new StringBuilder(value.substring(0, index));
- builder.append(escapedDelimiter);
- builder.append(value.substring(index + 1));
- return builder.toString();
- }
-
- private String unescapeDelimiterCharacter(String value) {
- if (value == null || value.length() == 0) {
- return value;
- }
-
- int index = value.indexOf(escapedDelimiter);
- if (index < 0) {
- return value;
- }
- StringBuilder builder = new StringBuilder(value.substring(0, index));
- builder.append(delimiter);
- builder.append(value.substring(index + 1));
- return builder.toString();
- }
-
- private boolean contains(String value, String currentValues) {
- return currentValues != null
- && currentValues.length() > 0
- && currentValues.indexOf(value) >= 0;
- }
-
- private boolean hasValues(String currentValues) {
- return currentValues != null && currentValues.length() > 0;
- }
-
- /**
- * Removes the given values from the strings stored in the preferences and
- * stores the preferences.
- *
- * @param values
- * the values
- */
- public void remove(String... valuesToRemove) {
- boolean removed = false;
- String[] currentValues = get();
- if (valuesToRemove != null) {
- for (int i = 0; i < currentValues.length; i++) {
- for (String valueToRemove : valuesToRemove) {
- if (valueToRemove.equals(currentValues[i])) {
- currentValues[i] = null;
- removed = true;
- }
- }
- }
- }
- if (removed) {
- store(currentValues);
- }
- }
-
- /**
- * Overrides the current values in the preferences with the values in the
- * given array (value in the preferences at index x is overridden with the
- * value in the given array at index x) and stores the preferences.
- */
- public void store(String[] newValues) {
- String[] currentValues = get();
- overrideValues(newValues, currentValues);
- doStore(concatenate(currentValues));
- }
-
- public void store() {
- store(null);
- }
-
- protected String concatenate(String[] values) {
- StringBuilder builder = new StringBuilder();
- for (int i = 0; i < values.length; i++) {
- if (values[i] != null) {
- if (builder.length() > 0) {
- builder.append(delimiter);
- }
- builder.append(values[i]);
- }
- }
- return builder.toString();
- }
-}
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java 2011-10-03 09:42:59 UTC (rev 35269)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloudelements/AbstractCloudElementTableView.java 2011-10-03 09:49:53 UTC (rev 35270)
@@ -44,6 +44,7 @@
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.part.ViewPart;
+import org.jboss.tools.common.ui.preferencevalue.StringPreferenceValue;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
@@ -53,7 +54,6 @@
import org.jboss.tools.deltacloud.core.IInstanceFilter;
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
-import org.jboss.tools.deltacloud.ui.preferences.StringPreferenceValue;
import org.jboss.tools.deltacloud.ui.views.CVMessages;
import org.jboss.tools.deltacloud.ui.views.Columns;
import org.jboss.tools.deltacloud.ui.views.Columns.Column;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/UIUtils.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/UIUtils.java 2011-10-03 09:42:59 UTC (rev 35269)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/utils/UIUtils.java 2011-10-03 09:49:53 UTC (rev 35270)
@@ -26,8 +26,8 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
+import org.jboss.tools.common.ui.preferencevalue.StringsPreferenceValue;
import org.jboss.tools.deltacloud.ui.Activator;
-import org.jboss.tools.deltacloud.ui.preferences.StringsPreferenceValue;
import org.osgi.service.prefs.Preferences;
/**
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 2011-10-03 09:42:59 UTC (rev 35269)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/CloudConnectionPage.java 2011-10-03 09:49:53 UTC (rev 35270)
@@ -57,6 +57,7 @@
import org.eclipse.ui.PlatformUI;
import org.jboss.tools.common.log.LogHelper;
import org.jboss.tools.common.ui.databinding.MandatoryStringValidator;
+import org.jboss.tools.common.ui.preferencevalue.StringPreferenceValue;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudDriver;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
@@ -64,7 +65,6 @@
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.IDeltaCloudPreferenceConstants;
import org.jboss.tools.deltacloud.ui.SWTImagesFactory;
-import org.jboss.tools.deltacloud.ui.preferences.StringPreferenceValue;
import org.jboss.tools.internal.deltacloud.ui.common.databinding.validator.CompositeValidator;
import org.jboss.tools.internal.deltacloud.ui.common.swt.JFaceUtils;
import org.jboss.tools.internal.deltacloud.ui.utils.ControlDecorationAdapter;
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java 2011-10-03 09:42:59 UTC (rev 35269)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java 2011-10-03 09:49:53 UTC (rev 35270)
@@ -17,12 +17,12 @@
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.ui.IWorkbench;
import org.jboss.tools.common.ui.WizardUtils;
+import org.jboss.tools.common.ui.preferencevalue.StringPreferenceValue;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudDriver;
import org.jboss.tools.deltacloud.core.job.AbstractCloudJob;
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.IDeltaCloudPreferenceConstants;
-import org.jboss.tools.deltacloud.ui.preferences.StringPreferenceValue;
/**
* @author Jeff Johnston
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 2011-10-03 09:42:59 UTC (rev 35269)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/NewCloudConnectionWizard.java 2011-10-03 09:49:53 UTC (rev 35270)
@@ -20,6 +20,7 @@
import org.eclipse.ui.IWorkbench;
import org.jboss.tools.common.log.StatusFactory;
import org.jboss.tools.common.ui.WizardUtils;
+import org.jboss.tools.common.ui.preferencevalue.StringPreferenceValue;
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudDriver;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
@@ -27,7 +28,6 @@
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
import org.jboss.tools.deltacloud.ui.IDeltaCloudPreferenceConstants;
-import org.jboss.tools.deltacloud.ui.preferences.StringPreferenceValue;
/**
* @author Jeff Johnston
Modified: trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/SshPrivateKeysPreferences.java
===================================================================
--- trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/SshPrivateKeysPreferences.java 2011-10-03 09:42:59 UTC (rev 35269)
+++ trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/SshPrivateKeysPreferences.java 2011-10-03 09:49:53 UTC (rev 35270)
@@ -15,9 +15,9 @@
import org.apache.deltacloud.client.utils.StringUtils;
import org.eclipse.core.runtime.Platform;
+import org.jboss.tools.common.ui.preferencevalue.StringPreferenceValue;
+import org.jboss.tools.common.ui.preferencevalue.StringsPreferenceValue;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
-import org.jboss.tools.deltacloud.ui.preferences.StringPreferenceValue;
-import org.jboss.tools.deltacloud.ui.preferences.StringsPreferenceValue;
/**
* @author André Dietisheim
13 years, 2 months
JBoss Tools SVN: r35269 - trunk/examples/tests/org.jboss.tools.project.examples.test.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-10-03 05:42:59 -0400 (Mon, 03 Oct 2011)
New Revision: 35269
Modified:
trunk/examples/tests/org.jboss.tools.project.examples.test/.project
Log:
JBIDE-9368 Dashboard(s) for easy news aggregation, twitter and easy additional/3rd party plugin installation and project template/creation
Modified: trunk/examples/tests/org.jboss.tools.project.examples.test/.project
===================================================================
--- trunk/examples/tests/org.jboss.tools.project.examples.test/.project 2011-10-03 09:40:00 UTC (rev 35268)
+++ trunk/examples/tests/org.jboss.tools.project.examples.test/.project 2011-10-03 09:42:59 UTC (rev 35269)
@@ -1,34 +1,51 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.jboss.tools.project.examples.test</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.project.examples.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+ <linkedResources>
+ <link>
+ <name>lib-org.jboss.tools.jsf.vpe.seam_3.3.0.v20111001-0617-H456-M4</name>
+ <type>2</type>
+ <location>E:/eclipse-3.7.1/plugins/org.jboss.tools.jsf.vpe.seam_3.3.0.v20111001-0617-H456-M4</location>
+ </link>
+ <link>
+ <name>lib-org.jboss.tools.jst.web.kb_3.3.0.v20111001-0515-H542-M4</name>
+ <type>2</type>
+ <location>E:/eclipse-3.7.1/plugins/org.jboss.tools.jst.web.kb_3.3.0.v20111001-0515-H542-M4</location>
+ </link>
+ <link>
+ <name>lib-org.jboss.tools.jst.web_3.3.0.v20111001-0515-H542-M4</name>
+ <type>2</type>
+ <location>E:/eclipse-3.7.1/plugins/org.jboss.tools.jst.web_3.3.0.v20111001-0515-H542-M4</location>
+ </link>
+ </linkedResources>
+</projectDescription>
13 years, 2 months
JBoss Tools SVN: r35268 - trunk/download.jboss.org/jbosstools/examples and 6 other directories.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2011-10-03 05:40:00 -0400 (Mon, 03 Oct 2011)
New Revision: 35268
Added:
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/LaunchJUnitTest.java
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunProjectExample.java
Modified:
trunk/central/plugins/org.jboss.tools.central/plugin.xml
trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/.project
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/META-INF/MANIFEST.MF
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/Activator.java
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/Messages.java
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/ImportProjectExample.java
trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/messages.properties
trunk/runtime/plugins/org.jboss.tools.runtime.core/plugin.xml
workspace/snjeza/jbossas7-examples/kitchensink.zip
workspace/snjeza/jbossas7-examples/login.zip
workspace/snjeza/jbossas7-examples/numberguess.zip
Log:
JBIDE-9368 Dashboard(s) for easy news aggregation, twitter and easy additional/3rd party plugin installation and project template/creation
Modified: trunk/central/plugins/org.jboss.tools.central/plugin.xml
===================================================================
--- trunk/central/plugins/org.jboss.tools.central/plugin.xml 2011-10-03 08:12:32 UTC (rev 35267)
+++ trunk/central/plugins/org.jboss.tools.central/plugin.xml 2011-10-03 09:40:00 UTC (rev 35268)
@@ -226,6 +226,15 @@
reference="JBoss AS 7 Quickstarts::kitchensink"/>
<tutorial
+ id="org.jboss.tools.central.jbossas.quickstart.jbossJavaee6Webapp"
+ categoryId="org.jboss.tools.central.jbossas.quickstart"
+ name="Creating your own application"
+ type="projectExample"
+ priority="5"
+ icon="icons/jbossas7.png"
+ reference="JBoss AS 7 Quickstarts::jboss-javaee6-webapp"/>
+
+ <tutorial
id="org.jboss.tools.central.Seam.registration2"
categoryId="org.jboss.tools.central.seam2"
name="Registration Example"
Modified: trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml
===================================================================
--- trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml 2011-10-03 08:12:32 UTC (rev 35267)
+++ trunk/download.jboss.org/jbosstools/examples/project-examples-maven-3.3.xml 2011-10-03 09:40:00 UTC (rev 35268)
@@ -160,7 +160,8 @@
</fix>
</fixes>
<importType>maven</importType>
- <importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
+ <importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
+ <welcome type="cheatsheets" url="/jboss-as-login/cheatsheets/login.xml"/>
</project>
<project>
@@ -200,7 +201,8 @@
</fix>
</fixes>
<importType>maven</importType>
- <importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
+ <importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
+ <welcome type="cheatsheets" url="/jboss-as-numberguess/cheatsheets/numberguess.xml"/>
</project>
<project>
@@ -241,7 +243,8 @@
</fix>
</fixes>
<importType>maven</importType>
- <importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
+ <importTypeDescription>The project example requires the m2eclipse, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
+ <welcome type="cheatsheets" url="/jboss-as-kitchensink/cheatsheets/kitchensink.xml"/>
</project>
<project>
@@ -282,11 +285,11 @@
</fix>
</fixes>
<importType>mavenArchetype</importType>
- <importTypeDescription>The project example requires the m2eclipse-core, m2eclipse-wtp and JBoss Maven Project Examples feature.</importTypeDescription>
+ <importTypeDescription>The project example requires the m2e, m2eclipse-wtp and JBoss Maven Integration feature.</importTypeDescription>
<mavenArchetype>
<archetypeGroupId>org.jboss.spec.archetypes</archetypeGroupId>
<archetypeArtifactId>jboss-javaee6-webapp</archetypeArtifactId>
- <archetypeVersion>7.0.0.CR1</archetypeVersion>
+ <archetypeVersion>7.0.0.Final</archetypeVersion>
<archetypeRepository>http://repository.jboss.org/nexus/content/groups/public/</archetypeRepository>
<groupId>org.jboss.tools.examples</groupId>
<artifactId>jboss-javaee6-webapp</artifactId>
@@ -297,5 +300,5 @@
</properties>
</mavenArchetype>
</project>
-
+
</projects>
Modified: trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/.project
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/.project 2011-10-03 08:12:32 UTC (rev 35267)
+++ trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/.project 2011-10-03 09:40:00 UTC (rev 35268)
@@ -1,34 +1,56 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.jboss.tools.project.examples.cheatsheet</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
- </natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.project.examples.cheatsheet</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
+ </natures>
+ <linkedResources>
+ <link>
+ <name>lib-org.jboss.tools.common.text.ext_3.3.0.v20111001-0437-H476-M4</name>
+ <type>2</type>
+ <location>E:/eclipse-3.7.1/plugins/org.jboss.tools.common.text.ext_3.3.0.v20111001-0437-H476-M4</location>
+ </link>
+ <link>
+ <name>lib-org.jboss.tools.common.text.xml_3.3.0.v20111001-0437-H476-M4</name>
+ <type>2</type>
+ <location>E:/eclipse-3.7.1/plugins/org.jboss.tools.common.text.xml_3.3.0.v20111001-0437-H476-M4</location>
+ </link>
+ <link>
+ <name>lib-org.jboss.tools.common_3.3.0.v20111001-0437-H476-M4</name>
+ <type>2</type>
+ <location>E:/eclipse-3.7.1/plugins/org.jboss.tools.common_3.3.0.v20111001-0437-H476-M4</location>
+ </link>
+ <link>
+ <name>lib-org.jboss.tools.jst.jsp_3.3.0.v20111001-0515-H542-M4</name>
+ <type>2</type>
+ <location>E:/eclipse-3.7.1/plugins/org.jboss.tools.jst.jsp_3.3.0.v20111001-0515-H542-M4</location>
+ </link>
+ </linkedResources>
+</projectDescription>
Modified: trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/META-INF/MANIFEST.MF
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/META-INF/MANIFEST.MF 2011-10-03 08:12:32 UTC (rev 35267)
+++ trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/META-INF/MANIFEST.MF 2011-10-03 09:40:00 UTC (rev 35268)
@@ -6,16 +6,16 @@
Bundle-Activator: org.jboss.tools.project.examples.cheatsheet.Activator
Bundle-Vendor: %BundleVendor
Bundle-Localization: plugin
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.ui.cheatsheets,
- org.eclipse.jdt.core,
- org.eclipse.core.resources,
- org.eclipse.ui.ide,
- org.eclipse.ui.workbench.texteditor,
- org.eclipse.text,
+Require-Bundle: org.eclipse.ui;bundle-version="3.7.0",
+ org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.ui.cheatsheets;bundle-version="3.4.100",
+ org.eclipse.jdt.core;bundle-version="3.7.0",
+ org.eclipse.core.resources;bundle-version="3.7.0",
+ org.eclipse.ui.ide;bundle-version="3.7.0",
+ org.eclipse.ui.workbench.texteditor;bundle-version="3.7.0",
+ org.eclipse.text;bundle-version="3.5.101",
org.jboss.tools.jst.jsp,
- org.eclipse.wst.sse.ui,
+ org.eclipse.wst.sse.ui;bundle-version="1.3.0",
org.jboss.tools.common.text.ext,
org.jboss.tools.common,
org.jboss.tools.common.model,
@@ -23,6 +23,8 @@
org.jboss.tools.project.examples,
org.eclipse.wst.server.core,
org.eclipse.wst.server.ui,
- org.jboss.ide.eclipse.as.core
+ org.jboss.ide.eclipse.as.core,
+ org.eclipse.jdt.junit;bundle-version="3.7.0",
+ org.eclipse.debug.core;bundle-version="3.7.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Modified: trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/Activator.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/Activator.java 2011-10-03 08:12:32 UTC (rev 35267)
+++ trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/Activator.java 2011-10-03 09:40:00 UTC (rev 35268)
@@ -1,5 +1,7 @@
package org.jboss.tools.project.examples.cheatsheet;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -47,4 +49,14 @@
return plugin;
}
+ public static void log(Throwable e) {
+ IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, e
+ .getLocalizedMessage(), e);
+ plugin.getLog().log(status);
+ }
+
+ public static void log(String message) {
+ IStatus status = new Status(IStatus.WARNING, PLUGIN_ID,message);
+ plugin.getLog().log(status);
+ }
}
Modified: trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/Messages.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/Messages.java 2011-10-03 08:12:32 UTC (rev 35267)
+++ trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/Messages.java 2011-10-03 09:40:00 UTC (rev 35268)
@@ -5,6 +5,8 @@
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.jboss.tools.project.examples.cheatsheet.messages"; //$NON-NLS-1$
public static String OpenFileInEditor_Cannot_open;
+ public static String LaunchJunitTest_The_project_does_not_exist;
+ public static String RunProjectExample_Invalid_project_example;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
Modified: trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/ImportProjectExample.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/ImportProjectExample.java 2011-10-03 08:12:32 UTC (rev 35267)
+++ trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/ImportProjectExample.java 2011-10-03 09:40:00 UTC (rev 35268)
@@ -24,7 +24,6 @@
import org.jboss.tools.project.examples.model.IImportProjectExample;
import org.jboss.tools.project.examples.model.Project;
import org.jboss.tools.project.examples.model.ProjectUtil;
-import org.jboss.tools.project.examples.wizard.NewProjectExamplesWizard;
public class ImportProjectExample extends Action implements ICheatSheetAction {
Added: trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/LaunchJUnitTest.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/LaunchJUnitTest.java (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/LaunchJUnitTest.java 2011-10-03 09:40:00 UTC (rev 35268)
@@ -0,0 +1,88 @@
+package org.jboss.tools.project.examples.cheatsheet.actions;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ProjectScope;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.preferences.IEclipsePreferences;
+import org.eclipse.core.runtime.preferences.IScopeContext;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.jdt.junit.launcher.JUnitLaunchShortcut;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.IActionBars;
+import org.eclipse.ui.IEditorSite;
+import org.eclipse.ui.IViewSite;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.IWorkbenchPartSite;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.cheatsheets.ICheatSheetAction;
+import org.eclipse.ui.cheatsheets.ICheatSheetManager;
+import org.jboss.tools.project.examples.cheatsheet.Activator;
+import org.jboss.tools.project.examples.cheatsheet.Messages;
+import org.osgi.service.prefs.BackingStoreException;
+
+public class LaunchJUnitTest extends Action implements ICheatSheetAction {
+
+ private static final String ACTIVE_PROFILES = "activeProfiles"; //$NON-NLS-1$
+
+ public void run(String[] params, ICheatSheetManager manager) {
+ if (params == null || params[0] == null) {
+ return;
+ }
+ IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot();
+
+ IProject project = workspaceRoot.getProject(params[0]);
+ if (project == null || !project.isOpen()) {
+ IWorkbenchPage page = PlatformUI.getWorkbench()
+ .getActiveWorkbenchWindow().getActivePage();
+ setStatusMessage(page, NLS.bind(Messages.LaunchJunitTest_The_project_does_not_exist, params[0]));
+ return;
+ }
+ if (params[1] != null) {
+ IScopeContext projectScope = new ProjectScope(project);
+ IEclipsePreferences projectNode = projectScope
+ .getNode("org.eclipse.m2e.core"); //$NON-NLS-1$
+ if (projectNode != null) {
+ String activeProfiles = projectNode.get(ACTIVE_PROFILES, null);
+ if (!params[1].equals(activeProfiles)) {
+ projectNode.put(ACTIVE_PROFILES, activeProfiles);
+ try {
+ projectNode.flush();
+ } catch (BackingStoreException e) {
+ Activator.log(e);
+ }
+ }
+ }
+ }
+ ISelection selection = new StructuredSelection(project);
+ JUnitLaunchShortcut launchShortcut = new JUnitLaunchShortcut();
+ launchShortcut.launch(selection, ILaunchManager.RUN_MODE);
+ }
+
+ private void setStatusMessage(IWorkbenchPage page, String message) {
+ IWorkbenchPart activePart = page.getActivePart();
+ IWorkbenchPartSite site = activePart.getSite();
+ IActionBars actionBar = null;
+ if (site instanceof IViewSite) {
+ IViewSite viewSite = (IViewSite) site;
+ actionBar = viewSite.getActionBars();
+ } else if (site instanceof IEditorSite) {
+ IEditorSite editorSite = (IEditorSite) site;
+ actionBar = editorSite.getActionBars();
+ }
+ if (actionBar == null) {
+ return;
+ }
+ IStatusLineManager lineManager = actionBar.getStatusLineManager();
+ if (lineManager == null) {
+ return;
+ }
+ lineManager.setMessage(message);
+ }
+
+}
Added: trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunProjectExample.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunProjectExample.java (rev 0)
+++ trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/actions/RunProjectExample.java 2011-10-03 09:40:00 UTC (rev 35268)
@@ -0,0 +1,52 @@
+package org.jboss.tools.project.examples.cheatsheet.actions;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.jface.action.Action;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.ui.cheatsheets.ICheatSheetAction;
+import org.eclipse.ui.cheatsheets.ICheatSheetManager;
+import org.jboss.tools.project.examples.ProjectExamplesActivator;
+import org.jboss.tools.project.examples.cheatsheet.Activator;
+import org.jboss.tools.project.examples.cheatsheet.Messages;
+import org.jboss.tools.project.examples.model.Category;
+import org.jboss.tools.project.examples.model.Project;
+import org.jboss.tools.project.examples.model.ProjectUtil;
+
+public class RunProjectExample extends Action implements ICheatSheetAction {
+
+ public void run(String[] params, ICheatSheetManager manager) {
+ if(params == null || params[0] == null ) {
+ return;
+ }
+
+ String[] projectExample = params[0].split("::"); //$NON-NLS-1$
+ if (projectExample == null || projectExample.length != 2 || projectExample[0] == null || projectExample[1] == null) {
+ Activator.log(NLS.bind(Messages.RunProjectExample_Invalid_project_example, params[0]));
+ return;
+ }
+ List<Category> categories = ProjectUtil.getProjects(new NullProgressMonitor());
+ Project project = null;
+ for (Category category:categories) {
+ if (projectExample[0].equals(category.getName())) {
+ for (Project p:category.getProjects()) {
+ if (projectExample[1].equals(p.getName())) {
+ project = p;
+ break;
+ }
+ }
+ }
+ if (project != null) {
+ break;
+ }
+ }
+ if (project != null) {
+ List<Project> selectedProjects = new ArrayList<Project>();
+ selectedProjects.add(project);
+ ProjectExamplesActivator.importProjectExamples(selectedProjects, true);
+ }
+ }
+
+}
Modified: trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/messages.properties
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/messages.properties 2011-10-03 08:12:32 UTC (rev 35267)
+++ trunk/examples/plugins/org.jboss.tools.project.examples.cheatsheet/src/org/jboss/tools/project/examples/cheatsheet/messages.properties 2011-10-03 09:40:00 UTC (rev 35268)
@@ -1 +1,3 @@
OpenFileInEditor_Cannot_open=Cannot open the {0} file.
+LaunchJunitTest_The_project_does_not_exist = The '{0}' project doesn't exist.
+RunProjectExample_Invalid_project_example=Invalid project example: {0}.
Modified: trunk/runtime/plugins/org.jboss.tools.runtime.core/plugin.xml
===================================================================
--- trunk/runtime/plugins/org.jboss.tools.runtime.core/plugin.xml 2011-10-03 08:12:32 UTC (rev 35267)
+++ trunk/runtime/plugins/org.jboss.tools.runtime.core/plugin.xml 2011-10-03 09:40:00 UTC (rev 35268)
@@ -10,9 +10,15 @@
id="org.jboss.tools.runtime.core.as.701"
name="JBoss AS 7.0.1 Everything (NOT Java EE6 Certified)"
version="7.0.1.Final"
- size="68MB"
+ size="74MB"
url="http://download.jboss.org/jbossas/7.0/jboss-as-7.0.1.Final/jboss-as-7.0.1..."/>
<runtime
+ id="org.jboss.tools.runtime.core.as.702"
+ name="JBoss AS 7.0.2 Everything (NOT Java EE6 Certified)"
+ version="7.0.2.Final"
+ size="75MB"
+ url="http://download.jboss.org/jbossas/7.0/jboss-as-7.0.2.Final/jboss-as-7.0.2..."/>
+ <runtime
id="org.jboss.tools.runtime.core.seam.222"
name="JBoss Seam 2.2.2.Final"
version="2.2.2.Final"
Modified: workspace/snjeza/jbossas7-examples/kitchensink.zip
===================================================================
(Binary files differ)
Modified: workspace/snjeza/jbossas7-examples/login.zip
===================================================================
(Binary files differ)
Modified: workspace/snjeza/jbossas7-examples/numberguess.zip
===================================================================
(Binary files differ)
13 years, 2 months
JBoss Tools SVN: r35267 - in trunk/as: plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal and 2 other directories.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-10-03 04:12:32 -0400 (Mon, 03 Oct 2011)
New Revision: 35267
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IDomain.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/OpenshiftService.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/Domain.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/InternalUser.java
trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/response/unmarshalling/DomainResponseUnmarshaller.java
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/DomainIntegrationTest.java
trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/DomainTest.java
Log:
[JBIDE-9813] implemented and tested IDomain#setNamespace
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IDomain.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IDomain.java 2011-10-03 07:14:19 UTC (rev 35266)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/IDomain.java 2011-10-03 08:12:32 UTC (rev 35267)
@@ -15,8 +15,10 @@
*/
public interface IDomain {
- public abstract String getNamespace() throws OpenshiftException;
+ public abstract void setNamespace(String namespace) throws OpenshiftException;
+ public abstract String getNamespace();
+
public abstract String getRhcDomain() throws OpenshiftException;
}
\ No newline at end of file
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/OpenshiftService.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/OpenshiftService.java 2011-10-03 07:14:19 UTC (rev 35266)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/OpenshiftService.java 2011-10-03 08:12:32 UTC (rev 35267)
@@ -144,7 +144,7 @@
String responseString = createHttpClient(url).post(requestString);
responseString = JsonSanitizer.sanitize(responseString);
OpenshiftResponse<IDomain> response =
- new DomainResponseUnmarshaller(request.getName(), user).unmarshall(responseString);
+ new DomainResponseUnmarshaller(request.getName(), user, this).unmarshall(responseString);
return response.getOpenshiftObject();
} catch (MalformedURLException e) {
throw new OpenshiftEndpointException(url, e, "Could reach openshift platform at \"{0}\"", url);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/Domain.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/Domain.java 2011-10-03 07:14:19 UTC (rev 35266)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/Domain.java 2011-10-03 08:12:32 UTC (rev 35267)
@@ -11,6 +11,7 @@
package org.jboss.ide.eclipse.as.openshift.core.internal;
import org.jboss.ide.eclipse.as.openshift.core.IDomain;
+import org.jboss.ide.eclipse.as.openshift.core.IOpenshiftService;
import org.jboss.ide.eclipse.as.openshift.core.OpenshiftException;
@@ -20,18 +21,20 @@
public class Domain extends UserInfoAware implements IDomain {
private String namespace;
+ private IOpenshiftService service;
- public Domain(String namespace, InternalUser user) {
- this(namespace, null, user);
+ public Domain(String namespace, InternalUser user, IOpenshiftService service) {
+ this(namespace, null, user, service);
}
- public Domain(String namespace, String rhcDomain, InternalUser user) {
+ public Domain(String namespace, String rhcDomain, InternalUser user, IOpenshiftService service) {
super(user);
this.namespace = namespace;
+ this.service = service;
}
@Override
- public String getNamespace() throws OpenshiftException {
+ public String getNamespace() {
return namespace;
}
@@ -39,4 +42,15 @@
public String getRhcDomain() throws OpenshiftException {
return getUserInfo().getRhcDomain();
}
+
+ @Override
+ public void setNamespace(String namespace) throws OpenshiftException {
+ InternalUser user = getUser();
+ IDomain domain = service.changeDomain(namespace, user.getSshKey(), user);
+ update(domain);
+ }
+
+ private void update(IDomain domain) {
+ this.namespace = domain.getNamespace();
+ }
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/InternalUser.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/InternalUser.java 2011-10-03 07:14:19 UTC (rev 35266)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/InternalUser.java 2011-10-03 08:12:32 UTC (rev 35267)
@@ -80,7 +80,9 @@
if (domain == null) {
this.domain = new Domain(
getUserInfo().getNamespace()
- , getUserInfo().getRhcDomain(), this);
+ , getUserInfo().getRhcDomain()
+ , this
+ , service);
}
return domain;
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/response/unmarshalling/DomainResponseUnmarshaller.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/response/unmarshalling/DomainResponseUnmarshaller.java 2011-10-03 07:14:19 UTC (rev 35266)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.openshift.core/src/org/jboss/ide/eclipse/as/openshift/core/internal/response/unmarshalling/DomainResponseUnmarshaller.java 2011-10-03 08:12:32 UTC (rev 35267)
@@ -12,6 +12,7 @@
import org.jboss.dmr.ModelNode;
import org.jboss.ide.eclipse.as.openshift.core.IDomain;
+import org.jboss.ide.eclipse.as.openshift.core.IOpenshiftService;
import org.jboss.ide.eclipse.as.openshift.core.internal.Domain;
import org.jboss.ide.eclipse.as.openshift.core.internal.InternalUser;
@@ -22,14 +23,16 @@
private String domainName;
private InternalUser user;
+ private IOpenshiftService service;
- public DomainResponseUnmarshaller(String domainName, InternalUser user) {
+ public DomainResponseUnmarshaller(String domainName, InternalUser user, IOpenshiftService service) {
this.domainName = domainName;
this.user = user;
+ this.service = service;
}
@Override
protected IDomain createOpenshiftObject(ModelNode node) {
- return new Domain(domainName, user);
+ return new Domain(domainName, user, service);
}
}
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/DomainIntegrationTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/DomainIntegrationTest.java 2011-10-03 07:14:19 UTC (rev 35266)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/DomainIntegrationTest.java 2011-10-03 08:12:32 UTC (rev 35267)
@@ -19,6 +19,7 @@
import org.jboss.ide.eclipse.as.openshift.test.internal.core.fakes.TestSSHKey;
import org.jboss.ide.eclipse.as.openshift.test.internal.core.fakes.TestUser;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
public class DomainIntegrationTest {
@@ -32,6 +33,7 @@
this.user = new TestUser();
}
+ @Ignore
@Test
public void canCreateDomain() throws Exception {
@@ -43,6 +45,7 @@
assertEquals(domainName, domain.getNamespace());
}
+ @Ignore
@Test
public void canChangeDomain() throws Exception {
@@ -54,6 +57,15 @@
assertEquals(domainName, domain.getNamespace());
}
+ @Test
+ public void canSetNamespaceOnDomain() throws Exception {
+ IDomain domain = user.getDomain();
+ assertNotNull(domain);
+ String newDomainName = createRandomString();
+ domain.setNamespace(newDomainName);
+ assertEquals(newDomainName, domain.getNamespace());
+ }
+
private String createRandomString() {
return String.valueOf(System.currentTimeMillis());
}
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/DomainTest.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/DomainTest.java 2011-10-03 07:14:19 UTC (rev 35266)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.openshift.test/src/org/jboss/ide/eclipse/as/openshift/test/internal/core/DomainTest.java 2011-10-03 08:12:32 UTC (rev 35267)
@@ -18,6 +18,7 @@
import java.net.URLEncoder;
import org.jboss.ide.eclipse.as.openshift.core.IDomain;
+import org.jboss.ide.eclipse.as.openshift.core.IOpenshiftService;
import org.jboss.ide.eclipse.as.openshift.core.OpenshiftException;
import org.jboss.ide.eclipse.as.openshift.core.SSHKeyPair;
import org.jboss.ide.eclipse.as.openshift.core.internal.InternalUser;
@@ -62,8 +63,9 @@
String responseString = createDomainResponseString(RHLOGIN, UUID);
responseString = JsonSanitizer.sanitize(responseString);
- InternalUser user = new InternalUser(RHLOGIN, PASSWORD, new NoopOpenshiftServiceFake());
- OpenshiftResponse<IDomain> response = new DomainResponseUnmarshaller(domainName, user).unmarshall(responseString);
+ IOpenshiftService service = new NoopOpenshiftServiceFake();
+ InternalUser user = new InternalUser(RHLOGIN, PASSWORD, service);
+ OpenshiftResponse<IDomain> response = new DomainResponseUnmarshaller(domainName, user, service).unmarshall(responseString);
assertNotNull(response);
IDomain domain = response.getOpenshiftObject();
13 years, 2 months
JBoss Tools SVN: r35266 - trunk/as/plugins/org.jboss.ide.eclipse.as.core.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2011-10-03 03:14:19 -0400 (Mon, 03 Oct 2011)
New Revision: 35266
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
Log:
JBIDE-9783 - allowing for java7 facets
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2011-10-03 01:43:50 UTC (rev 35265)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/plugin.xml 2011-10-03 07:14:19 UTC (rev 35266)
@@ -917,7 +917,7 @@
version="1.0"/>
<facet id="wst.web" version="1.0,1.2,1.3,1.4"/>
<facet id="jst.web" version="2.2,2.3,2.4,2.5"/>
- <facet id="jst.java" version="1.3,1.4,5.0,6.0"/>
+ <facet id="jst.java" version="1.3,1.4,5.0,6.0,1.7"/>
<facet id="jst.utility" version="1.0"/>
<facet id="jst.ejb" version="2.0,2.1,3.0"/>
<facet id="jst.ear" version="1.2,1.3,1.4,5.0"/>
@@ -940,7 +940,7 @@
version="4.3"/>
<facet id="wst.web" version="1.0,1.2,1.3,1.4"/>
<facet id="jst.web" version="2.2,2.3,2.4,2.5"/>
- <facet id="jst.java" version="1.3,1.4,5.0,6.0"/>
+ <facet id="jst.java" version="1.3,1.4,5.0,6.0,1.7"/>
<facet id="jst.utility" version="1.0"/>
<facet id="jst.connector" version="1.0,1.5"/>
<facet id="jst.ejb" version="2.0,2.1,3.0"/>
@@ -953,7 +953,7 @@
version="5.0"/>
<facet id="wst.web" version="1.0,1.2,1.3,1.4"/>
<facet id="jst.web" version="2.2,2.3,2.4,2.5"/>
- <facet id="jst.java" version="1.3,1.4,5.0,6.0"/>
+ <facet id="jst.java" version="1.3,1.4,5.0,6.0,1.7"/>
<facet id="jst.utility" version="1.0"/>
<facet id="jst.connector" version="1.0,1.5"/>
<facet id="jst.ejb" version="2.0,2.1,3.0"/>
@@ -994,7 +994,7 @@
version="3.2"/>
<facet id="wst.web" version="1.0,1.2,1.3,1.4"/>
<facet id="jst.web" version="2.2,2.3,2.4"/>
- <facet id="jst.java" version="1.3,1.4,5.0,6.0"/>
+ <facet id="jst.java" version="1.3,1.4,5.0,6.0,1.7"/>
<facet id="jst.utility" version="1.0"/>
<facet id="jst.ejb" version="2.0,2.1"/>
<facet id="jst.ear" version="1.2,1.3,1.4"/>
@@ -1008,7 +1008,7 @@
version="4.0"/>
<facet id="wst.web" version="1.0,1.2,1.3,1.4"/>
<facet id="jst.web" version="2.2,2.3,2.4,2.5"/>
- <facet id="jst.java" version="1.3,1.4,5.0,6.0"/>
+ <facet id="jst.java" version="1.3,1.4,5.0,6.0,1.7"/>
<facet id="jst.utility" version="1.0"/>
<facet id="jst.connector" version="1.0,1.5"/>
<facet id="jst.ejb" version="2.0,2.1,3.0"/>
@@ -1022,7 +1022,7 @@
version="4.2"/>
<facet id="wst.web" version="1.0,1.2,1.3,1.4"/>
<facet id="jst.web" version="2.2,2.3,2.4,2.5"/>
- <facet id="jst.java" version="1.3,1.4,5.0,6.0"/>
+ <facet id="jst.java" version="1.3,1.4,5.0,6.0,1.7"/>
<facet id="jst.utility" version="1.0"/>
<facet id="jst.connector" version="1.0,1.5"/>
<facet id="jst.ejb" version="2.0,2.1,3.0"/>
@@ -1036,7 +1036,7 @@
version="5.0"/>
<facet id="wst.web" version="1.0,1.2,1.3,1.4"/>
<facet id="jst.web" version="2.2,2.3,2.4,2.5"/>
- <facet id="jst.java" version="1.3,1.4,5.0,6.0"/>
+ <facet id="jst.java" version="1.3,1.4,5.0,6.0,1.7"/>
<facet id="jst.utility" version="1.0"/>
<facet id="jst.connector" version="1.0,1.5"/>
<facet id="jst.ejb" version="2.0,2.1,3.0"/>
@@ -1050,7 +1050,7 @@
version="5.1"/>
<facet id="wst.web" version="1.0,1.2,1.3,1.4"/>
<facet id="jst.web" version="2.2,2.3,2.4,2.5"/>
- <facet id="jst.java" version="1.3,1.4,5.0,6.0"/>
+ <facet id="jst.java" version="1.3,1.4,5.0,6.0,1.7"/>
<facet id="jst.utility" version="1.0"/>
<facet id="jst.connector" version="1.0,1.5"/>
<facet id="jst.ejb" version="2.0,2.1,3.0"/>
@@ -1078,7 +1078,7 @@
version="7.0"/>
<facet id="wst.web" version="1.0,1.2,1.3,1.4"/>
<facet id="jst.web" version="2.2,2.3,2.4,2.5,3.0"/>
- <facet id="jst.java" version="5.0,6.0"/>
+ <facet id="jst.java" version="5.0,6.0,1.7"/>
<facet id="jst.utility" version="1.0"/>
<facet id="jst.connector" version="1.0,1.5,1.6"/>
<facet id="jst.ejb" version="2.0,2.1,3.0,3.1"/>
13 years, 2 months
JBoss Tools SVN: r35265 - branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US.
by jbosstools-commits@lists.jboss.org
Author: irooskov(a)redhat.com
Date: 2011-10-02 21:43:50 -0400 (Sun, 02 Oct 2011)
New Revision: 35265
Modified:
branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/installation.xml
Log:
updated for TOOLSDOC-250
Modified: branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml
===================================================================
--- branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2011-10-02 16:12:36 UTC (rev 35264)
+++ branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/Book_Info.xml 2011-10-03 01:43:50 UTC (rev 35265)
@@ -8,7 +8,7 @@
<productname>JBoss Developer Studio</productname>
<productnumber>4.1</productnumber>
<edition>4.1.1</edition>
-<pubsnumber>15</pubsnumber>
+<pubsnumber>17</pubsnumber>
<abstract>
<para>The Getting Started Guide explains the JBoss Developer Studio.</para>
</abstract>
Modified: branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/installation.xml
===================================================================
--- branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/installation.xml 2011-10-02 16:12:36 UTC (rev 35264)
+++ branches/jbosstools-3.2.x/documentation/guides/GettingStartedGuide/en-US/installation.xml 2011-10-03 01:43:50 UTC (rev 35265)
@@ -1,4 +1,4 @@
-ace<chapter id="installation">
+<chapter id="installation">
<?dbhtml filename="getting_started.html"?>
<chapterinfo>
<keywordset>
@@ -819,47 +819,47 @@
</listitem>
<listitem>
<para>
- Select the
+ Select the JBoss Enterprise Application Platform 5.x Runtime Library (the JBoss Service Oriented Architecture Platform 5.x is based on JBoss Enterprise Application Platform 5.x)
</para>
</listitem>
<listitem>
<para>
-
+ Click on the <guibutton>Edit</guibutton> button
</para>
</listitem>
<listitem>
<para>
-
+ Select a server runtime from the list
</para>
</listitem>
<listitem>
<para>
-
+ Click on the <guibutton>Finish</guibutton> button
</para>
</listitem>
<listitem>
<para>
-
+ Select the JBoss ESB Runtime library
</para>
</listitem>
<listitem>
<para>
-
+ Click on the <guibutton>Edit</guibutton> button
</para>
</listitem>
<listitem>
<para>
-
+ Select the <guilabel>Server Contained</guilabel> entry in the list, that matches the server runtime you selected earlier
</para>
</listitem>
<listitem>
<para>
-
+ Click on the <guibutton>Finish</guibutton> button
</para>
</listitem>
<listitem>
<para>
-
+ Click on the <guibutton>OK</guibutton> button
</para>
</listitem>
</itemizedlist>
13 years, 2 months
JBoss Tools SVN: r35263 - trunk/download.jboss.org/jbosstools/builds/cascade.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-10-02 11:46:35 -0400 (Sun, 02 Oct 2011)
New Revision: 35263
Modified:
trunk/download.jboss.org/jbosstools/builds/cascade/swimlanes.txt
Log:
updated swimlanes
Modified: trunk/download.jboss.org/jbosstools/builds/cascade/swimlanes.txt
===================================================================
--- trunk/download.jboss.org/jbosstools/builds/cascade/swimlanes.txt 2011-10-02 15:46:23 UTC (rev 35262)
+++ trunk/download.jboss.org/jbosstools/builds/cascade/swimlanes.txt 2011-10-02 15:46:35 UTC (rev 35263)
@@ -1,4 +1,4 @@
-Revised swimlanes, as implemented in 3.2_stable_branch, 3.3_stable_branch and 3.3_trunk jobs, 2011/09/28
+Revised swimlanes, as implemented in 3.2_stable_branch, 3.3_stable_branch and 3.3_trunk jobs, 2011/10/02
------------------------
@@ -38,5 +38,10 @@
smooks [removed from JBDS, still in JBT]
seam -> hibernate, jsf
central -> examples, portlet, seam, as, archives, jmx, jsf, vpe, jst, hibernate, freemarker, runtime, common, tests
+runtime -> common, tests, jmx
+esb -> as, jst, common, tests
+cdi -> jst
+(all but common and tests) -> usage
+usage -> common, tests
------------------------
13 years, 2 months
JBoss Tools SVN: r35262 - trunk/common/tests.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-10-02 11:46:23 -0400 (Sun, 02 Oct 2011)
New Revision: 35262
Modified:
trunk/common/tests/pom.xml
Log:
fix property name and typo
Modified: trunk/common/tests/pom.xml
===================================================================
--- trunk/common/tests/pom.xml 2011-10-02 14:40:32 UTC (rev 35261)
+++ trunk/common/tests/pom.xml 2011-10-02 15:46:23 UTC (rev 35262)
@@ -19,7 +19,7 @@
<id>common-tests-libs</id>
<activation>
<property>
- <name>coverage</name>
+ <name>common-coverage</name>
</property>
</activation>
<modules>
@@ -28,11 +28,11 @@
</profile>
<profile>
- <id>common-tests-deafult</id>
+ <id>common-tests-default</id>
<activation>
<activeByDefault>true</activeByDefault>
<property>
- <name>coverage</name>
+ <name>common-coverage</name>
</property>
</activation>
<modules>
@@ -50,7 +50,7 @@
<id>common-tests-coverage-report</id>
<activation>
<property>
- <name>coverage</name>
+ <name>common-coverage</name>
</property>
</activation>
<modules>
13 years, 2 months