Skip to content

Commit

Permalink
performance optim.
Browse files Browse the repository at this point in the history
  • Loading branch information
pardonmycode committed May 24, 2024
1 parent ab3fdf9 commit 217d36e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/abapactionchain/commands/ActionsBeforeActivation.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ public static void useAbapCleaner() {
} catch (ExecutionException | NotDefinedException | NotEnabledException | NotHandledException e) {
e.printStackTrace();
}
sleep(100);
sleep(10);
}

public static void saveCurrentFile(IAbapSourcePage sourcepage, IProgressMonitor monitor) {
System.out.println( "Start save currentFile" );
sourcepage.doSave(monitor);
sleep(100);
sleep(50);
}


Expand Down
2 changes: 1 addition & 1 deletion src/abapactionchain/utils/ProjectUtility.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ public static IEditorPart getActiveEditor() {
IEditorPart activeEditor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
.getActiveEditor();
System.out.println(" getActiveEditor in ProjectUtility.java : " + activeEditor );

return activeEditor;
} catch (Exception e) {
System.out.println(e);
Expand Down Expand Up @@ -188,7 +189,6 @@ public static void openObject(final IProject project, final IAdtObjectReference


public static void runObject(final IProject project, final IAdtObjectReference adtObjectRef) {

AdtSapGuiEditorUtilityFactory.createSapGuiEditorUtility().openEditorForObject(project, adtObjectRef, true,
WorkbenchAction.EXECUTE.toString(), null, Collections.<String, String>emptyMap());
}
Expand Down
14 changes: 12 additions & 2 deletions src/abapactionchain/views/CommandListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ public void postExecuteSuccess(String commandId, Object returnValue) {
}

case "org.eclipse.ui.file.save": {
ActionsBeforeActivation.runActionChain(commandId);

boolean debug = true;
if (debug) {
System.out.println(this.getClass().getSimpleName());
System.out.println( commandId );
System.out.println( returnValue );
}

ActionsBeforeActivation.runActionChain(commandId);
}
}
}
Expand All @@ -42,9 +50,11 @@ public void preExecute(String commandId, ExecutionEvent event) {
// TODO Auto-generated method stub
boolean debug = true;
if (debug) {
System.out.println(this.getClass().getSimpleName());
System.out.println("preExecute");
System.out.println( event );
System.out.println( );
}

}

}

0 comments on commit 217d36e

Please sign in to comment.