Skip to content

Commit 2c7522b

Browse files
committed
disabled debugger for the time being
1 parent 897fb8e commit 2c7522b

File tree

3 files changed

+33
-6
lines changed

3 files changed

+33
-6
lines changed

mode/src/processing/mode/android/AndroidBuild.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class AndroidBuild extends JavaBuild {
9292
// Gradle build files
9393
static private final String GRADLE_SETTINGS_TEMPLATE = "Settings.gradle.tmpl";
9494
static private final String GRADLE_PROPERTIES_TEMPLATE = "Properties.gradle.tmpl";
95+
static private final String EXPORTED_GRADLE_PROPERTIES_TEMPLATE = "ExpProperties.gradle.tmpl";
9596
static private final String LOCAL_PROPERTIES_TEMPLATE = "Properties.local.tmpl";
9697
static private final String TOP_GRADLE_BUILD_TEMPLATE = "TopBuild.gradle.tmpl";
9798
static private final String APP_GRADLE_BUILD_ECJ_TEMPLATE = "AppBuildECJ.gradle.tmpl";
@@ -322,9 +323,19 @@ private void createTopModule(String projectModules)
322323
replaceMap.put("@@gradle_plugin_version@@", GRADLE_PLUGIN_VER);
323324
AndroidUtil.createFileFromTemplate(buildTemplate, buildlFile, replaceMap);
324325

325-
File gradlePropsTemplate = mode.getContentFile("templates/" + GRADLE_PROPERTIES_TEMPLATE);
326+
// File gradlePropsTemplate = mode.getContentFile("templates/" + GRADLE_PROPERTIES_TEMPLATE);
327+
// File gradlePropsFile = new File(tmpFolder, "gradle.properties");
328+
// Util.copyFile(gradlePropsTemplate, gradlePropsFile);
329+
File gradlePropsTemplate;
330+
if (exportProject) {
331+
gradlePropsTemplate = mode.getContentFile("templates/" + EXPORTED_GRADLE_PROPERTIES_TEMPLATE);
332+
} else {
333+
gradlePropsTemplate = mode.getContentFile("templates/" + GRADLE_PROPERTIES_TEMPLATE);
334+
}
326335
File gradlePropsFile = new File(tmpFolder, "gradle.properties");
327-
Util.copyFile(gradlePropsTemplate, gradlePropsFile);
336+
String javaHome = Platform.getJavaHome().getAbsolutePath();
337+
replaceMap.put("@@java_home@@", javaHome);
338+
AndroidUtil.createFileFromTemplate(gradlePropsTemplate, gradlePropsFile, replaceMap);
328339

329340
File settingsTemplate = mode.getContentFile("templates/" + GRADLE_SETTINGS_TEMPLATE);
330341
File settingsFile = new File(tmpFolder, "settings.gradle");

mode/src/processing/mode/android/AndroidEditor.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ protected AndroidEditor(Base base, String path, EditorState state,
8585
androidMode.resetUserSelection();
8686
androidMode.checkSDK(this);
8787

88-
initDebugger();
88+
// initDebugger();
8989

9090
androidTools = loadAndroidTools();
9191
addToolsToMenu();
@@ -164,11 +164,14 @@ public void actionPerformed(ActionEvent e) {
164164
handleStop();
165165
}
166166
});
167-
return buildSketchMenu(new JMenuItem[] { buildDebugMenu(), runItem, presentItem, stopItem });
167+
// return buildSketchMenu(new JMenuItem[] { buildDebugMenu(), runItem, presentItem, stopItem });
168+
return buildSketchMenu(new JMenuItem[] { runItem, presentItem, stopItem });
168169
}
169170

170171

171172
public JMenu buildModeMenu() {
173+
super.buildModeMenu();
174+
172175
androidMenu = new JMenu(AndroidMode.getTextString("menu.android"));
173176
JMenuItem item;
174177

@@ -289,7 +292,7 @@ public void menuCanceled(MenuEvent e) {
289292
});
290293

291294
androidMenu.addSeparator();
292-
295+
293296
return androidMenu;
294297
}
295298

@@ -418,6 +421,7 @@ public void run() {
418421

419422

420423
public void handleStop() {
424+
/*
421425
if (debugger.isStarted()) {
422426
debugger.stopDebug();
423427
@@ -430,6 +434,14 @@ public void handleStop() {
430434
// focus the PDE again after quitting presentation mode [toxi 030903]
431435
toFront();
432436
}
437+
*/
438+
toolbar.activateStop();
439+
androidMode.handleStop(this);
440+
toolbar.deactivateStop();
441+
toolbar.deactivateRun();
442+
443+
// focus the PDE again after quitting presentation mode [toxi 030903]
444+
toFront();
433445
}
434446

435447
@Override

mode/src/processing/mode/android/AndroidToolbar.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,9 @@ public void handlePressed(MouseEvent e, int sel) {
131131
@Override
132132
public List<EditorButton> createButtons() {
133133
// aEditor not ready yet because this is called by super()
134-
final boolean debug = ((AndroidEditor) editor).isDebuggerEnabled();
134+
// final boolean debug = ((AndroidEditor) editor).isDebuggerEnabled();
135+
final boolean debug = false;
136+
135137

136138
ArrayList<EditorButton> toReturn = new ArrayList<EditorButton>();
137139
final String runText = debug ?
@@ -197,6 +199,7 @@ private void handleStep(int modifiers) {
197199

198200
@Override
199201
public void addModeButtons(Box box, JLabel label) {
202+
/*
200203
EditorButton debugButton =
201204
new EditorButton(this, "/lib/toolbar/debug",
202205
Language.text("toolbar.debug")) {
@@ -212,6 +215,7 @@ public void actionPerformed(ActionEvent e) {
212215
// debugButton.setRolloverLabel(label);
213216
box.add(debugButton);
214217
addGap(box);
218+
*/
215219
}
216220

217221
@Override

0 commit comments

Comments
 (0)