Skip to content

Commit b4a70b7

Browse files
authored
Merge pull request #135 from UCSDOalads/funcGroup
Fixed the classSearch test and fix minor instance redundancy
2 parents 64f2a5f + d47591a commit b4a70b7

5 files changed

Lines changed: 9 additions & 7 deletions

File tree

src/actions/AddLazyJavaMethodComponentAction.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public void performAction() {
5656
associatedAction.setMethodComponent(comp);
5757
associatedAction.setMethod(comp.getDisplayingClass().getMethods()[Integer.parseInt(desiaredConstructorIndex)]);
5858
GlobalPaintActionExecuter.getSharedInstance().execute(associatedAction, panel);
59+
5960
}
6061
}
6162

src/actions/global/globalactions/FileOpenAndSaveGlobalActionTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public void test() {
4242
= (FileSaveAsGlobalAction) ActionName.FILE_SAVE_AS_GLOBAL_ACTION
4343
.getAssociatedAction();
4444
fileSaveAssociatedAction.setFilePath("JSPFileSaveOpenTest.xml");
45+
4546
fileSaveAssociatedAction.execute(panel);
4647

4748

@@ -57,6 +58,7 @@ public void test() {
5758
= (FileOpenGlobalAction) ActionName.FILE_OPEN_GLOBAL_ACTION
5859
.getAssociatedAction();
5960
fileOpenAssociatedAction.setFileToOpen("JSPFileSaveOpenTest.xml");
61+
6062
fileOpenAssociatedAction.execute(panel);
6163

6264
//Components on the panel should be the same as what was saved to be
@@ -68,6 +70,7 @@ public void test() {
6870

6971
xml.delete();
7072

73+
7174
}
7275

7376
}

src/classpathutil/ClassSearchTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public void test() {
1313
ClassSearch search = ClassSearch.sharedInstance();
1414
ArrayList<String> classesForName = search.classesForName("System");
1515

16-
assertTrue(classesForName.contains("java.lang.System"));
16+
assertTrue(classesForName.contains("System (java.lang)"));
1717

1818
}
1919

src/paintcomponents/java/interactive/MethodPaintComponent.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,7 @@ private void init() {
8484
public void evaluate(){
8585

8686
// prepare argument list
87-
ArrayList<DataToPoint> toPoints = getToPoints();
88-
89-
Object operatingInstance = instance;
90-
87+
ArrayList<DataToPoint> toPoints = getToPoints();
9188

9289
// args takes toPoint 1 to size
9390
Object[] args = new Object[toPoints.size()];
@@ -108,7 +105,7 @@ public void evaluate(){
108105
}
109106

110107
try {
111-
returnVal = this.displayingMethod.invoke(operatingInstance, args);
108+
returnVal = this.displayingMethod.invoke(instance, args);
112109
} catch (IllegalAccessException | IllegalArgumentException
113110
| InvocationTargetException e) {
114111
// TODO Auto-generated catch block

src/script/InterpreterSelectAction.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import ui.PaintPanel;
44

55
public class InterpreterSelectAction {
6-
6+
77
public InterpreterSelectAction(Tokenizer tokenizer, PaintPanel panel)
88
throws ExecutionErrorException {
99
String token = tokenizer.next();
@@ -12,5 +12,6 @@ public InterpreterSelectAction(Tokenizer tokenizer, PaintPanel panel)
1212
} else {
1313
throw new ExecutionErrorException("component not found");
1414
}
15+
panel.repaint();
1516
}
1617
}

0 commit comments

Comments
 (0)