Skip to content

Commit

Permalink
Fix from Christian Kaestner.
Browse files Browse the repository at this point in the history
git-svn-id: http://argouml-spl.tigris.org/svn/argouml-spl/trunk@143 625f9a90-7dc3-4719-81dc-e092bff34f78
  • Loading branch information
Marcus Vinícius de Ávila Couto committed Oct 7, 2011
1 parent a3f48d4 commit a601429
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ public class ApplicationVersion {
public static String getVersion() {
return version;
}


//#if defined(COGNITIVE)
//@#$LPS-LOGGING:GranularityType:Method
/**
* Retrieve the online HTML manual of ArgoUML for a critic.
* You need to append the critic class-name.
Expand All @@ -65,7 +67,8 @@ public static String getManualForCritic() {
+ stableVersion
+ "-single/argomanual.html#critics.";
}

//#endif

/**
* Retrieve the URL of the online manual of ArgoUML.
*
Expand Down
42 changes: 37 additions & 5 deletions src/argouml-app/src/org/argouml/kernel/MemberList.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,11 @@ class MemberList implements List<ProjectMember> {

private List<ProjectMemberDiagram> diagramMembers =
new ArrayList<ProjectMemberDiagram>(10);


//#if defined(COGNITIVE)
//@#$LPS-LOGGING:GranularityType:Field
private AbstractProjectMember todoList;
//#endif
private AbstractProjectMember profileConfiguration;

/**
Expand Down Expand Up @@ -139,15 +142,20 @@ public synchronized boolean remove(Object member) {
if (model == member) {
model = null;
return true;
} else if (todoList == member) {
}
//#if defined(COGNITIVE)
//@#$LPS-COGNITIVE:GranularityType:Statement
else if (todoList == member) {
//#if defined(LOGGING)
//@#$LPS-LOGGING:GranularityType:Statement
//@#$LPS-LOGGING:Localization:NestedStatement
LOG.info("Removing todo list");
//#endif
setTodoList(null);
setTodoList(null);
return true;
} else if (profileConfiguration == member) {
}
//#endif
else if (profileConfiguration == member) {
//#if defined(LOGGING)
//@#$LPS-LOGGING:GranularityType:Statement
//@#$LPS-LOGGING:Localization:NestedStatement
Expand Down Expand Up @@ -195,9 +203,12 @@ private List<ProjectMember> buildOrderedMemberList() {
temp.add(model);
}
temp.addAll(diagramMembers);
//#if defined(COGNITIVE)
//@#$LPS-LOGGING:GranularityType:Statement
if (todoList != null) {
temp.add(todoList);
}
//#endif
return temp;
}

Expand All @@ -222,19 +233,25 @@ public synchronized int size() {
if (model != null) {
++size;
}
//#if defined(COGNITIVE)
//@#$LPS-COGNITIVE:GranularityType:Statement
if (todoList != null) {
++size;
}
//#endif
if (profileConfiguration != null) {
++size;
}
return size;
}

public synchronized boolean contains(Object member) {
//#if defined(COGNITIVE)
//@#$LPS-LOGGING:GranularityType:Statement
if (todoList == member) {
return true;
}
//#endif
if (model == member) {
return true;
}
Expand All @@ -253,9 +270,12 @@ public synchronized void clear() {
if (model != null) {
model.remove();
}
//#if defined(COGNITIVE)
//@#$LPS-LOGGING:GranularityType:Statement
if (todoList != null) {
todoList.remove();
}
//#endif
if (profileConfiguration != null) {
profileConfiguration.remove();
}
Expand All @@ -275,11 +295,17 @@ public synchronized ProjectMember get(int i) {
}

if (i == diagramMembers.size()) {
//#if defined(COGNITIVE)
//@#$LPS-LOGGING:GranularityType:Statement
if (todoList != null) {
return todoList;
} else {
//#endif
return profileConfiguration;
//#if defined(COGNITIVE)
//@#$LPS-LOGGING:GranularityType:Statement
}
//#endif
}

if (i == (diagramMembers.size() + 1)) {
Expand All @@ -302,15 +328,20 @@ public synchronized ProjectMember[] toArray() {
for (ProjectMemberDiagram d : diagramMembers) {
temp[pos++] = d;
}
//#if defined(COGNITIVE)
//@#$LPS-COGNITIVE:GranularityType:Statement
if (todoList != null) {
temp[pos++] = todoList;
}
//#endif
if (profileConfiguration != null) {
temp[pos++] = profileConfiguration;
}
return temp;
}


//#if defined(COGNITIVE)
//@#$LPS-LOGGING:GranularityType:Method
private void setTodoList(AbstractProjectMember member) {
//#if defined(LOGGING)
//@#$LPS-LOGGING:GranularityType:Statement
Expand All @@ -319,6 +350,7 @@ private void setTodoList(AbstractProjectMember member) {
//#endif
todoList = member;
}
//#endif

public <T> T[] toArray(T[] a) {
throw new UnsupportedOperationException();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//#if defined(COGNITIVE)
//@#$LPS-COGNITIVE:GranularityType:Class

// $Id$
// Copyright (c) 1996-2006 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
Expand Down Expand Up @@ -66,3 +69,4 @@ public String getOffender() {
}
}

//#endif
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//#if defined(COGNITIVE)
//@#$LPS-COGNITIVE:GranularityType:Class

// $Id$
// Copyright (c) 1996-2006 The Regents of the University of California. All
// Rights Reserved. Permission to use, copy, modify, and distribute this
Expand Down Expand Up @@ -107,3 +110,4 @@ protected void setupTokens() {
}
}

//#endif
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,10 @@ class XmiFilePersister extends AbstractFilePersister
//#endif
private List<String> pgmlStrings = new ArrayList<String>();

//#if defined(COGNITIVE)
//@#$LPS-LOGGING:GranularityType:Field
private String todoString;

//#endif
private String argoString;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,13 @@ public class GenericArgoMenuBar extends JMenuBar implements
* This should be invoked automatically when importing sources.
*/
private ArgoJMenu arrange;

//#if defined(COGNITIVE)
//@#$LPS-LOGGING:GranularityType:Field
/**
* The critique menu.
*/
private ArgoJMenu critique;

//#endif
/**
* It needs it. Currently there is only system information and an about
* text. Hyperlinking to online docs at argouml.org is considered to be a
Expand Down
5 changes: 3 additions & 2 deletions src/argouml-app/src/org/argouml/ui/cmd/ShortcutMgr.java
Original file line number Diff line number Diff line change
Expand Up @@ -276,10 +276,11 @@ public class ShortcutMgr {

/** Action key for open goals */
public static final String ACTION_OPEN_GOALS = "openGoals";

//#if defined(COGNITIVE)
//@#$LPS-LOGGING:GranularityType:Field
/** Action key for open critics */
public static final String ACTION_OPEN_CRITICS = "openCritics";

//#endif
/** Action key for help */
public static final String ACTION_HELP = "help";

Expand Down

0 comments on commit a601429

Please sign in to comment.