]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman/src/org/splat/simer/EditKnowledgeElementAction.java
Salome HOME
Modifications to respect PMD rules.
[tools/siman.git] / Workspace / Siman / src / org / splat / simer / EditKnowledgeElementAction.java
index 7f9afa14976ea718473f00a21f15b2b50ff56a6a..76a15f5af42e5fcaddcb28c04b9a194da69e477e 100644 (file)
@@ -81,7 +81,7 @@ public class EditKnowledgeElementAction extends DisplayStudyStepAction {
         * @return SUCCESS if no exceptions
         */
        public String doInitialize() {
-               mystudy = getOpenStudy();
+               _openStudy = getOpenStudy();
 
                setMenuProperty("study");
                setTitleProperty("study");
@@ -119,9 +119,9 @@ public class EditKnowledgeElementAction extends DisplayStudyStepAction {
 
                try {
                        User user = getConnectedUser();
-                       mystudy = getOpenStudy();
+                       _openStudy = getOpenStudy();
 
-                       Step step = mystudy.getSelectedStep();
+                       Step step = _openStudy.getSelectedStep();
                        Scenario scene = (Scenario) step.getOwner(); // It is necessarily a Scenario
 
                        if ((title == null) || (value == null)) { 
@@ -132,16 +132,16 @@ public class EditKnowledgeElementAction extends DisplayStudyStepAction {
                                } else { // Edition of a knowledge
                                        getKnowledgeElementService().update(kelm, value);
                                }
-                               mystudy.update(kelm); // For updating the truncated value
+                               _openStudy.update(kelm); // For updating the truncated value
                        } else { // Addition of a new Knowledge Element
                                KnowledgeElement.Properties kprop = new KnowledgeElement.Properties();
                                KnowledgeElementType ktype = getKnowledgeElementTypeService()
                                                .selectType(Integer.valueOf(type));
                                kprop.setType(ktype).setTitle(title).setValue(value).setAuthor(
                                                user);
-                               mystudy.add(getScenarioService().addKnowledgeElement(scene,
+                               _openStudy.add(getScenarioService().addKnowledgeElement(scene,
                                                kprop));
-                               getMenu("study").selects(mystudy.getSelection()); // Updates the menu icon, in case of first added document
+                               getMenu("study").selects(_openStudy.getSelection()); // Updates the menu icon, in case of first added document
                        }
                        return SUCCESS;
                } catch (RuntimeException saverror) {
@@ -159,15 +159,15 @@ public class EditKnowledgeElementAction extends DisplayStudyStepAction {
         * @return SUCCESS if no exceptions
         */
        public String doDeleteKnowledge() {
-               mystudy = getOpenStudy();
-               Step step = mystudy.getSelectedStep();
+               _openStudy = getOpenStudy();
+               Step step = _openStudy.getSelectedStep();
                Scenario scene = (Scenario) step.getOwner(); // It is necessarily a Scenario
 
                KnowledgeElement kelm = scene.getKnowledgeElement(Integer
-                               .valueOf(myindex));
+                               .valueOf(_myindex));
                getScenarioService().removeKnowledgeElement(scene, kelm); // The knowledge element necessarily exists
 
-               mystudy.remove(kelm);
+               _openStudy.remove(kelm);
                updateMenu();
 
                return SUCCESS;
@@ -201,17 +201,17 @@ public class EditKnowledgeElementAction extends DisplayStudyStepAction {
         * @return the selected knowledge element
         */
        private KnowledgeElement getKnowledgeElement() {
-               mystudy = getOpenStudy();
-               Step step = mystudy.getSelectedStep();
+               _openStudy = getOpenStudy();
+               Step step = _openStudy.getSelectedStep();
                Scenario scene = (Scenario) step.getOwner(); // It is necessarily a Scenario
-               return scene.getKnowledgeElement(Integer.valueOf(myindex));
+               return scene.getKnowledgeElement(Integer.valueOf(_myindex));
        }
 
        /**
         * Update current menu.
         */
        private void updateMenu() {
-               getMenu("study").selects(mystudy.getSelection()); // Updates the menu icon, in case of last removed document
+               getMenu("study").selects(_openStudy.getSelection()); // Updates the menu icon, in case of last removed document
 
                setMenuProperty("study");
                setTitleProperty("study");
@@ -248,7 +248,7 @@ public class EditKnowledgeElementAction extends DisplayStudyStepAction {
         */
        public String getSelectedKnowledge() {
                // -------------------------------------
-               return myindex;
+               return _myindex;
        }
 
        /**