Author: svasilyev
Date: 2007-09-17 09:41:59 -0400 (Mon, 17 Sep 2007)
New Revision: 3654
Added:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/.options
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/AppFileLocProvider.java
Log:
Debug tune options were added
Added: branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/.options
===================================================================
--- branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/.options
(rev 0)
+++
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/.options 2007-09-17
13:41:59 UTC (rev 3654)
@@ -0,0 +1,2 @@
+org.jboss.tools.vpe.xulrunner/debug=true
+org.jboss.tools.vpe.xulrunner/debug/browser_start=false
\ No newline at end of file
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java
===================================================================
---
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java 2007-09-17
13:24:52 UTC (rev 3653)
+++
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/BrowserPlugin.java 2007-09-17
13:41:59 UTC (rev 3654)
@@ -1,5 +1,6 @@
package org.jboss.tools.vpe.xulrunner;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.resource.ImageDescriptor;
import org.jboss.tools.common.log.BaseUIPlugin;
import org.osgi.framework.BundleContext;
@@ -10,11 +11,16 @@
public class BrowserPlugin extends BaseUIPlugin {
// The plug-in ID
- public static final String PLUGIN_ID =
"org.jboss.tools.vpe.xulrunner.browser";
-
+ public static final String PLUGIN_ID = "org.jboss.tools.vpe.xulrunner";
+
+ public static final boolean DEBUG_BROWSERSTART;
// The shared instance
private static BrowserPlugin plugin;
+ static {
+ DEBUG_BROWSERSTART = "true".equals(Platform.getDebugOption(PLUGIN_ID +
"/debug/browser_start"));
+ }
+
/**
* The constructor
*/
Modified:
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/AppFileLocProvider.java
===================================================================
---
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/AppFileLocProvider.java 2007-09-17
13:24:52 UTC (rev 3653)
+++
branches/jbosstools_xulrunner/vpe/plugins/org.jboss.tools.vpe.xulrunner/src/org/jboss/tools/vpe/xulrunner/browser/AppFileLocProvider.java 2007-09-17
13:41:59 UTC (rev 3654)
@@ -27,35 +27,48 @@
public File getFile(String prop, boolean[] persistent) {
persistent[0] = false;
- // TODO Sergey Vasilyev remove debug output
- System.out.println("AppFileLocProvider.getFile(" + prop + ")");
+ File resultFile = null;
if ("ProfD".equals(prop)) { // $NON-NLS-1$
- return userDataPath;
+ resultFile = userDataPath;
} else if ("UHist".equals(prop)) { // $NON-NLS-1$
- return new File(userDataPath, HISTORY_FILE);
+ resultFile = new File(userDataPath, HISTORY_FILE);
} else if ("ComRegF".equals(prop)) { // $NON-NLS-1$
- return new File(userDataPath, COMPREG_FILE);
+ resultFile = new File(userDataPath, COMPREG_FILE);
} else if ("XptiRegF".equals(prop)) { // $NON-NLS-1$
- return new File(userDataPath, XPTI_FILE);
+ resultFile = new File(userDataPath, XPTI_FILE);
} else if ("GreD".equals(prop)) { // $NON-NLS-1$
- return xulRunnerPath;
- } else if ("GreComsD".equals(prop) || "ComsD".equals(prop)) { //
$NON-NLS-1$ $NON-NLS-1$
- return new File(xulRunnerPath, COMPONENTS_DIRECTORY);
+ resultFile = xulRunnerPath;
+ } else if ("GreComsD".equals(prop) || "ComsD".equals(prop)) { //
$NON-NLS-1$ // $NON-NLS-1$
+ resultFile = new File(xulRunnerPath, COMPONENTS_DIRECTORY);
}
+
+ if (BrowserPlugin.DEBUG_BROWSERSTART) {
+ System.out.println("AppFileLocProvider.getFile(" + prop +
")=\"" + (resultFile == null ? "null" : resultFile.toString()) +
"\"");
+ }
- return null;
+ return resultFile;
}
public File[] getFiles(String prop) {
- // TODO Sergey Vasilyev remove debug output
- System.out.println("AppFileLocProvider.getFiles(" + prop + ")");
-
+ File[] resultFiles = null;
if("APluginsDL".equals(prop)) { // $NON-NLS-1$
- return new File[] {new File(xulRunnerPath, PLUGINS_DIRECTORY)};
+ resultFiles = new File[] {new File(xulRunnerPath, PLUGINS_DIRECTORY)};
}
- return null;
+ if (BrowserPlugin.DEBUG_BROWSERSTART) {
+ if (resultFiles != null) {
+ int size = resultFiles.length;
+
+ System.out.print("AppFileLocProvider.getFiles(" + prop +
")={\"");
+ for(int i=0; i<size; i++) {
+ System.out.print((i > 0 ? ", " : "") +
resultFiles[i].toString());
+ }
+ System.out.println("\"}");
+ }
+ }
+
+ return resultFiles;
}
}
Show replies by date