# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: C:\Users\mkleint\src\core-main2 # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. Index: maven/src/org/netbeans/modules/maven/api/execute/RunUtils.java --- maven/src/org/netbeans/modules/maven/api/execute/RunUtils.java Base (BASE) +++ maven/src/org/netbeans/modules/maven/api/execute/RunUtils.java Locally Modified (Based On LOCAL) @@ -138,7 +138,7 @@ } private static ExecutorTask executeMavenImpl(String runtimeName, final MavenExecutor exec) { - ExecutorTask task = ExecutionEngine.getDefault().execute(runtimeName, exec, exec.getInputOutput()); + ExecutorTask task = ExecutionEngine.getDefault().execute(runtimeName, exec, exec.getInputOutput("Terminal")); exec.setTask(task); return task; } Index: maven/src/org/netbeans/modules/maven/execute/AbstractMavenExecutor.java --- maven/src/org/netbeans/modules/maven/execute/AbstractMavenExecutor.java Base (BASE) +++ maven/src/org/netbeans/modules/maven/execute/AbstractMavenExecutor.java Locally Modified (Based On LOCAL) @@ -172,7 +172,7 @@ protected final void processInitialMessage() { Iterator it1 = messages.iterator(); Iterator it2 = listeners.iterator(); - InputOutput ioput = getInputOutput(); + InputOutput ioput = getInputOutput("Terminal"); try { while (it1.hasNext()) { OutputListener ol = it2.next(); Index: maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java --- maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java Base (BASE) +++ maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java Locally Modified (Based On LOCAL) @@ -137,7 +137,7 @@ clonedConfig.setPreExecution(new BeanRunConfig(clonedConfig.getPreExecution())); } int executionresult = -10; - InputOutput ioput = getInputOutput(); + InputOutput ioput = getInputOutput("Terminal"); ExecutionContext exCon = ActionToGoalUtils.ACCESSOR.createContext(ioput, handle); // check the prerequisites if (clonedConfig.getProject() != null) { Index: maven/src/org/netbeans/modules/maven/execute/MavenExecutor.java --- maven/src/org/netbeans/modules/maven/execute/MavenExecutor.java Base (BASE) +++ maven/src/org/netbeans/modules/maven/execute/MavenExecutor.java Locally Modified (Based On LOCAL) @@ -54,7 +54,7 @@ void setTask(ExecutorTask task); - InputOutput getInputOutput(); + InputOutput getInputOutput(String type); void addInitialMessage(String line, OutputListener listener); } Index: maven/src/org/netbeans/modules/maven/execute/OutputTabMaintainer.java --- maven/src/org/netbeans/modules/maven/execute/OutputTabMaintainer.java Base (BASE) +++ maven/src/org/netbeans/modules/maven/execute/OutputTabMaintainer.java Locally Modified (Based On LOCAL) @@ -58,12 +58,14 @@ private static class AllContext { final String name; + final String type; final Class tabContextType; final TabContext tabContext; - AllContext(String name, Class tabContextType, TabContext tabContext) { + AllContext(String name, String type, Class tabContextType, TabContext tabContext) { this.name = name; this.tabContextType = tabContextType; this.tabContext = tabContext; + this.type = type; } } @@ -76,6 +78,7 @@ private static final Map> freeTabs = new WeakHashMap>(); protected InputOutput io; + private String type; private final String name; protected OutputTabMaintainer(String name) { @@ -87,7 +90,7 @@ protected final void markFreeTab() { synchronized (freeTabs) { assert io != null; - freeTabs.put(io, new AllContext(name, tabContextType(), createContext())); + freeTabs.put(io, new AllContext(name, type, tabContextType(), createContext())); } } @@ -99,20 +102,22 @@ return new Action[0]; } - public final InputOutput getInputOutput() { + public final InputOutput getInputOutput(String type) { if (io == null) { - io = createInputOutput(); + io = createInputOutput(type); } return io; } - protected final InputOutput createInputOutput() { + protected final InputOutput createInputOutput(String type) { synchronized (freeTabs) { for (Map.Entry> entry : freeTabs.entrySet()) { InputOutput free = entry.getKey(); + AllContext allContext = entry.getValue(); - if (io == null && allContext.name.equals(name) && allContext.tabContextType == tabContextType()) { + if (io == null && allContext.name.equals(name) && allContext.type.equals(type) && allContext.tabContextType == tabContextType()) { // Reuse it. + this.type = type; io = free; reassignAdditionalContext(tabContextType().cast(allContext.tabContext)); try { @@ -130,7 +135,10 @@ } // } if (io == null) { - io = IOProvider.getDefault().getIO(name, createNewTabActions()); + IOProvider provider = type == null ? IOProvider.getDefault() : IOProvider.get(type); + this.type = type; + io = provider.getIO(name, createNewTabActions()); + io.setInputVisible(true); } return io;