Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode')
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/commands/CreateControlResource.java1
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/commands/RemoveControlResourceCommand.java18
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/messages/Messages.java127
3 files changed, 77 insertions, 69 deletions
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/commands/CreateControlResource.java b/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/commands/CreateControlResource.java
index ed0c5389f0b..874fcf6078e 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/commands/CreateControlResource.java
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/commands/CreateControlResource.java
@@ -176,6 +176,7 @@ public class CreateControlResource extends AbstractControlResourceCommand {
* @param objectToUncontrol
* the object to uncontrol
* @return the target resrource
+ * @since 2.0
*/
protected Resource getTargetResrource(EObject objectToUncontrol) {
return getRequest().getModelSet().getAssociatedResource(objectToUncontrol, getFileExtension(), true);
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/commands/RemoveControlResourceCommand.java b/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/commands/RemoveControlResourceCommand.java
index da2aa0eb187..11081d7381e 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/commands/RemoveControlResourceCommand.java
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/commands/RemoveControlResourceCommand.java
@@ -40,22 +40,28 @@ import org.eclipse.papyrus.infra.services.controlmode.messages.Messages;
*/
public class RemoveControlResourceCommand extends AbstractControlResourceCommand {
- /** The Constant PREVIOUS_RESOURCE_ERROR. */
+ /** The Constant PREVIOUS_RESOURCE_ERROR.
+ * @since 2.0*/
protected static final String PREVIOUS_RESOURCE_ERROR = Messages.getString("RemoveControlResourceCommand.previous.resource.error"); //$NON-NLS-1$
- /** The Constant TARGET_RESOURCE_ERROR. */
+ /** The Constant TARGET_RESOURCE_ERROR.
+ * @since 2.0*/
protected static final String TARGET_RESOURCE_ERROR = Messages.getString("RemoveControlResourceCommand.target.resource.error"); //$NON-NLS-1$
- /** The Constant RESOURCE_ERROR. */
+ /** The Constant RESOURCE_ERROR.
+ * @since 2.0*/
protected static final String RESOURCE_ERROR = Messages.getString("RemoveControlResourceCommand.resource.error"); //$NON-NLS-1$
- /** The Constant RESOURCESET_ERROR. */
+ /** The Constant RESOURCESET_ERROR.
+ * @since 2.0*/
protected static final String RESOURCESET_ERROR = Messages.getString("RemoveControlResourceCommand.resourceset.error"); //$NON-NLS-1$
- /** The Constant CONTROL_OBJECT_ERROR. */
+ /** The Constant CONTROL_OBJECT_ERROR.
+ * @since 2.0*/
protected static final String CONTROL_OBJECT_ERROR = Messages.getString("RemoveControlResourceCommand.object.error"); //$NON-NLS-1$
- /** The Constant UNCONTROL_COMMAND_TITLE. */
+ /** The Constant UNCONTROL_COMMAND_TITLE.
+ * @since 2.0*/
protected static final String UNCONTROL_COMMAND_TITLE = Messages.getString("RemoveControlResourceCommand.command.title"); //$NON-NLS-1$
/**
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/messages/Messages.java b/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/messages/Messages.java
index 8ba599cd9ed..cdceb1f1bbe 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/messages/Messages.java
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/messages/Messages.java
@@ -1,63 +1,64 @@
-/*****************************************************************************
- * Copyright (c) 2015 CEA LIST 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:
- * CEA LIST - Initial API and implementation
- *
- *****************************************************************************/
-
-package org.eclipse.papyrus.infra.services.controlmode.messages;
-
-import java.util.MissingResourceException;
-import java.util.ResourceBundle;
-
-/**
- * Messages class to access to externalised strings.
- *
- * @author Gabriel Pascual
- *
- */
-public class Messages {
-
- /** The Constant BUNDLE_NAME. */
- private static final String BUNDLE_NAME = "org.eclipse.papyrus.infra.services.controlmode.messages.messages"; //$NON-NLS-1$
-
- /** The Constant RESOURCE_BUNDLE. */
- private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
-
- private Messages() {
- }
-
- /**
- * Gets the string.
- *
- * @param key
- * the key
- * @return the string
- */
- public static String getString(String key) {
- try {
- return RESOURCE_BUNDLE.getString(key);
- } catch (MissingResourceException e) {
- return '!' + key + '!';
- }
- }
-
- /**
- * Gets the string.
- *
- * @param key
- * the key
- * @param parameters
- * the parameters
- * @return the string
- */
- public static String getString(String key, Object... parameters) {
- return String.format(getString(key), parameters);
- }
-}
+/*****************************************************************************
+ * Copyright (c) 2015 CEA LIST 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:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.services.controlmode.messages;
+
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * Messages class to access to externalised strings.
+ *
+ * @author Gabriel Pascual
+ * @since 2.0
+ *
+ */
+public class Messages {
+
+ /** The Constant BUNDLE_NAME. */
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.infra.services.controlmode.messages.messages"; //$NON-NLS-1$
+
+ /** The Constant RESOURCE_BUNDLE. */
+ private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME);
+
+ private Messages() {
+ }
+
+ /**
+ * Gets the string.
+ *
+ * @param key
+ * the key
+ * @return the string
+ */
+ public static String getString(String key) {
+ try {
+ return RESOURCE_BUNDLE.getString(key);
+ } catch (MissingResourceException e) {
+ return '!' + key + '!';
+ }
+ }
+
+ /**
+ * Gets the string.
+ *
+ * @param key
+ * the key
+ * @param parameters
+ * the parameters
+ * @return the string
+ */
+ public static String getString(String key, Object... parameters) {
+ return String.format(getString(key), parameters);
+ }
+}

Back to the top