Lines 147-152
Link Here
|
147 |
* @since org.netbeans.modules.java.api.common/1 1.20 |
147 |
* @since org.netbeans.modules.java.api.common/1 1.20 |
148 |
*/ |
148 |
*/ |
149 |
public abstract class BaseActionProvider implements ActionProvider { |
149 |
public abstract class BaseActionProvider implements ActionProvider { |
|
|
150 |
public static interface ActionPropertiesProvider { |
151 |
Properties getProperties(); |
152 |
} |
153 |
|
150 |
public static final String AUTOMATIC_BUILD_TAG = ".netbeans_automatic_build"; |
154 |
public static final String AUTOMATIC_BUILD_TAG = ".netbeans_automatic_build"; |
151 |
|
155 |
|
152 |
private static final Logger LOG = Logger.getLogger(BaseActionProvider.class.getName()); |
156 |
private static final Logger LOG = Logger.getLogger(BaseActionProvider.class.getName()); |
Lines 417-423
Link Here
|
417 |
return; |
421 |
return; |
418 |
} |
422 |
} |
419 |
called.set(true); |
423 |
called.set(true); |
420 |
Properties p = new Properties(); |
424 |
Properties p = getProperties(context); |
421 |
String[] targetNames; |
425 |
String[] targetNames; |
422 |
|
426 |
|
423 |
targetNames = getTargetNames(command, context, p, doJavaChecks); |
427 |
targetNames = getTargetNames(command, context, p, doJavaChecks); |
Lines 429-435
Link Here
|
429 |
showBuildActionWarning(context); |
433 |
showBuildActionWarning(context); |
430 |
return ; |
434 |
return ; |
431 |
} |
435 |
} |
432 |
Map<String, Object> execProperties = new HashMap<String, Object>(); |
436 |
Map<String, Object> execProperties = getPropertiesMap(context); |
433 |
|
437 |
|
434 |
copyMultiValue(ProjectProperties.RUN_JVM_ARGS, execProperties); |
438 |
copyMultiValue(ProjectProperties.RUN_JVM_ARGS, execProperties); |
435 |
prepareWorkDir(execProperties); |
439 |
prepareWorkDir(execProperties); |
Lines 1902-1905
Link Here
|
1902 |
return result; |
1906 |
return result; |
1903 |
} |
1907 |
} |
1904 |
|
1908 |
|
|
|
1909 |
private static Properties getProperties(Lookup context) { |
1910 |
ActionPropertiesProvider app = context.lookup(ActionPropertiesProvider.class); |
1911 |
Properties props = new Properties(); |
1912 |
if (app != null) { |
1913 |
props.putAll(app.getProperties()); |
1914 |
} |
1915 |
return props; |
1916 |
} |
1917 |
|
1918 |
private static Map<String, Object> getPropertiesMap(Lookup context) { |
1919 |
Properties props = getProperties(context); |
1920 |
|
1921 |
Map<String, Object> map = new HashMap<String, Object>(); |
1922 |
for(Map.Entry<Object, Object> e : props.entrySet()) { |
1923 |
Object k = e.getKey(); |
1924 |
Object v = e.getValue(); |
1925 |
if (k != null && k instanceof String) { |
1926 |
map.put((String)k, v); |
1927 |
} |
1928 |
} |
1929 |
|
1930 |
return map; |
1931 |
} |
1905 |
} |
1932 |
} |