Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2012-03-13 21:42:16 -0400
committerSergey Prigogin2012-03-13 21:42:16 -0400
commitada23a9a2f553630410d3765c9086b8b163ee815 (patch)
tree87137ada1645f93c582dbbb658c9ed3e5a4972bc /codan/org.eclipse.cdt.codan.ui
parentc510e7ad5b2edf4fa6d1a80eee209caa4a10f275 (diff)
downloadorg.eclipse.cdt-ada23a9a2f553630410d3765c9086b8b163ee815.tar.gz
org.eclipse.cdt-ada23a9a2f553630410d3765c9086b8b163ee815.tar.xz
org.eclipse.cdt-ada23a9a2f553630410d3765c9086b8b163ee815.zip
Bug 372551. Removed the external tool checker support until all design
issues are resolved.
Diffstat (limited to 'codan/org.eclipse.cdt.codan.ui')
-rw-r--r--codan/org.eclipse.cdt.codan.ui/META-INF/MANIFEST.MF1
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/externaltool/ConsolePrinter.java54
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/externaltool/ConsolePrinterProvider.java68
-rw-r--r--codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/externaltool/NullConsolePrinter.java36
4 files changed, 0 insertions, 159 deletions
diff --git a/codan/org.eclipse.cdt.codan.ui/META-INF/MANIFEST.MF b/codan/org.eclipse.cdt.codan.ui/META-INF/MANIFEST.MF
index 0a60ee43bb..9517be08f7 100644
--- a/codan/org.eclipse.cdt.codan.ui/META-INF/MANIFEST.MF
+++ b/codan/org.eclipse.cdt.codan.ui/META-INF/MANIFEST.MF
@@ -20,7 +20,6 @@ Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.cdt.codan.internal.ui;x-friends:="org.eclipse.cdt.codan.ui.cxx",
org.eclipse.cdt.codan.internal.ui.actions;x-friends:="org.eclipse.cdt.codan.ui.cxx",
org.eclipse.cdt.codan.internal.ui.dialogs;x-friends:="org.eclipse.cdt.codan.ui.cxx",
- org.eclipse.cdt.codan.internal.ui.externaltool;x-friends:="org.eclipse.cdt.codan.ui.cxx",
org.eclipse.cdt.codan.internal.ui.preferences;x-friends:="org.eclipse.cdt.codan.ui.cxx",
org.eclipse.cdt.codan.internal.ui.views;x-internal:=true,
org.eclipse.cdt.codan.internal.ui.widgets;x-internal:=true,
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/externaltool/ConsolePrinter.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/externaltool/ConsolePrinter.java
deleted file mode 100644
index f7f2218593..0000000000
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/externaltool/ConsolePrinter.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Google, Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Alex Ruiz (Google) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.codan.internal.ui.externaltool;
-
-import org.eclipse.cdt.codan.core.externaltool.IConsolePrinter;
-import org.eclipse.ui.console.MessageConsole;
-import org.eclipse.ui.console.MessageConsoleStream;
-
-import java.io.IOException;
-
-/**
- * Default implementation of <code>{@link IConsolePrinter}</code>.
- *
- * @author alruiz@google.com (Alex Ruiz)
- */
-class ConsolePrinter implements IConsolePrinter {
- private final MessageConsole console;
- private final MessageConsoleStream out;
-
- ConsolePrinter(MessageConsole console) {
- this.console = console;
- out = console.newMessageStream();
- }
-
- @Override
- public void clear() {
- console.clearConsole();
- }
-
- @Override
- public void println(String s) {
- out.println(s);
- }
-
- @Override
- public void println() {
- out.println();
- }
-
- @Override
- public void close() {
- try {
- out.close();
- } catch (IOException ignored) {}
- }
-}
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/externaltool/ConsolePrinterProvider.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/externaltool/ConsolePrinterProvider.java
deleted file mode 100644
index 14e6b763b6..0000000000
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/externaltool/ConsolePrinterProvider.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Google, Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Alex Ruiz (Google) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.codan.internal.ui.externaltool;
-
-import static org.eclipse.ui.console.IConsoleConstants.ID_CONSOLE_VIEW;
-
-import org.eclipse.cdt.codan.core.externaltool.IConsolePrinter;
-import org.eclipse.cdt.codan.core.externaltool.IConsolePrinterProvider;
-import org.eclipse.cdt.codan.internal.ui.CodanUIActivator;
-import org.eclipse.cdt.codan.ui.CodanEditorUtility;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.console.ConsolePlugin;
-import org.eclipse.ui.console.IConsole;
-import org.eclipse.ui.console.IConsoleManager;
-import org.eclipse.ui.console.IConsoleView;
-import org.eclipse.ui.console.MessageConsole;
-
-/**
- * Default implementation of <code>{@link IConsolePrinterProvider}</code>.
- *
- * @author alruiz@google.com (Alex Ruiz)
- */
-public class ConsolePrinterProvider implements IConsolePrinterProvider {
- private static final NullConsolePrinter NULL_CONSOLE = new NullConsolePrinter();
-
- @Override
- public IConsolePrinter createConsole(String externalToolName, boolean shouldDisplayOutput) {
- if (shouldDisplayOutput) {
- try {
- return createOrFindConsole(externalToolName);
- } catch (Throwable e) {
- CodanUIActivator.log("Unable to create/find console", e); //$NON-NLS-1$
- }
- }
- return NULL_CONSOLE;
- }
-
- private IConsolePrinter createOrFindConsole(String externalToolName) throws PartInitException {
- MessageConsole console = findConsole(externalToolName);
- IWorkbenchPage page = CodanEditorUtility.getActivePage();
- if (page != null) {
- IConsoleView view = (IConsoleView) page.showView(ID_CONSOLE_VIEW);
- view.display(console);
- }
- return new ConsolePrinter(console);
- }
-
- private static MessageConsole findConsole(String externalToolName) {
- IConsoleManager consoleManager = ConsolePlugin.getDefault().getConsoleManager();
- for (IConsole console : consoleManager.getConsoles()) {
- if (externalToolName.equals(console.getName()) && console instanceof MessageConsole) {
- return (MessageConsole) console;
- }
- }
- MessageConsole console = new MessageConsole(externalToolName, null);
- consoleManager.addConsoles(new IConsole[] { console });
- return console;
- }
-}
diff --git a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/externaltool/NullConsolePrinter.java b/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/externaltool/NullConsolePrinter.java
deleted file mode 100644
index bab9f02959..0000000000
--- a/codan/org.eclipse.cdt.codan.ui/src/org/eclipse/cdt/codan/internal/ui/externaltool/NullConsolePrinter.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 Google, Inc and others.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Alex Ruiz (Google) - initial API and implementation
- *******************************************************************************/
-package org.eclipse.cdt.codan.internal.ui.externaltool;
-
-import org.eclipse.cdt.codan.core.externaltool.IConsolePrinter;
-
-/**
- * No-op implementation of <code>{@link IConsolePrinter}</code>.
- *
- * @author alruiz@google.com (Alex Ruiz)
- */
-class NullConsolePrinter implements IConsolePrinter {
- @Override
- public void clear() {
- }
-
- @Override
- public void println(String message) {
- }
-
- @Override
- public void println() {
- }
-
- @Override
- public void close() {
- }
-}

Back to the top