1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 14:12:10 +02:00

Fix Qt plugin's project structure

The Qt plugins have been naming internal packages using two different
prefixes:

    cdt.qt.internal
    cdt.internal.qt

This renames all packages to cdt.internal.qt, which seems to be the
convention for other projects.

I've increased the Qt plugin versions because alot of new API has been
added, especially to the qt.core plugin.  I increased the version in the
MANIFEST.MF and pom.xml files.

I've also fixed the MANIFEST.MF files to take CDT out of the plugin
names.

I've also replaced a call to CCorePlugin.log(Exception) with a call to
QtUIPlugin.log (and added the logging functions to QtUIPlugin.

Change-Id: I1e3e7b2a42c2eb79fe33608c14a1abcf013a9f2c
Signed-off-by: Andrew Eidsness <eclipse@jfront.com>
Reviewed-on: https://git.eclipse.org/r/19698
Tested-by: Hudson CI
Reviewed-by: Doug Schaefer <dschaefer@qnx.com>
IP-Clean: Doug Schaefer <dschaefer@qnx.com>
This commit is contained in:
Andrew Eidsness 2013-12-12 07:40:51 -05:00 committed by Doug Schaefer
parent 5428ad5001
commit c6c1ef94fc
50 changed files with 126 additions and 65 deletions

View file

@ -1,10 +1,10 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: CDT Qt Support Core
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.qt.core;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.eclipse.cdt.qt.core.QtPlugin
Bundle-Vendor: Eclipse CDT
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.resources,
org.eclipse.core.expressions;bundle-version="[3.2.0,4.0.0)",

View file

@ -4,7 +4,10 @@
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
pluginName=C/C++ Qt Support Core
providerName=Eclipse CDT
qtProjectFile.name = Qt Project File
qmlFile.name = QML File
qmakeEnvProvider.name = QMake Environment Provider
QtInstallHeaders.pathProvider.name = Qt Installed Headers
QtInstallHeaders.pathProvider.name = Qt Installed Headers

View file

@ -67,7 +67,7 @@
id="qt.PDOMASTProcessor"
name="Qt PDOM AST Processor">
<processor
class="org.eclipse.cdt.qt.internal.core.pdom.QtPDOMASTProcessor">
class="org.eclipse.cdt.internal.qt.core.pdom.QtPDOMASTProcessor">
<enablement>
<with variable="projectNatures">
<iterate operator="or">
@ -80,11 +80,11 @@
<extension point="org.eclipse.cdt.core.language">
<pdomLinkageFactory
id="Qt"
class="org.eclipse.cdt.qt.internal.core.pdom.PDOMQtLinkageFactory"/>
class="org.eclipse.cdt.internal.qt.core.pdom.PDOMQtLinkageFactory"/>
</extension>
<extension point="org.eclipse.cdt.core.LanguageSettingsProvider">
<provider
class="org.eclipse.cdt.qt.internal.core.QtIncludePathsProvider"
class="org.eclipse.cdt.internal.qt.core.QtIncludePathsProvider"
id="org.eclipse.cdt.qt.core.QtPathsProvider"
name="%QtInstallHeaders.pathProvider.name"
prefer-non-shared="false">

View file

@ -11,7 +11,7 @@
<relativePath>../../pom.xml</relativePath>
</parent>
<version>1.0.0-SNAPSHOT</version>
<version>1.1.0-SNAPSHOT</version>
<artifactId>org.eclipse.cdt.qt.core</artifactId>
<packaging>eclipse-plugin</packaging>
</project>

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core;
package org.eclipse.cdt.internal.qt.core;
import java.io.BufferedReader;
import java.io.File;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core;
package org.eclipse.cdt.internal.qt.core;
import java.util.HashMap;
import java.util.List;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core;
package org.eclipse.cdt.internal.qt.core;
import java.util.ArrayList;
import java.util.Arrays;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.index;
package org.eclipse.cdt.internal.qt.core.index;
import org.eclipse.cdt.qt.core.index.IQObject;
import org.eclipse.cdt.qt.core.index.IQObject.IMember;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.index;
package org.eclipse.cdt.internal.qt.core.index;
import org.eclipse.cdt.core.index.IIndex;
import org.eclipse.cdt.qt.core.QtPlugin;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.index;
package org.eclipse.cdt.internal.qt.core.index;
import java.util.ArrayList;
import java.util.Collection;

View file

@ -5,17 +5,17 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.index;
package org.eclipse.cdt.internal.qt.core.index;
import java.util.Collection;
import java.util.Collections;
import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.internal.qt.core.QtMethodUtil;
import org.eclipse.cdt.internal.qt.core.pdom.QtPDOMQMethod;
import org.eclipse.cdt.qt.core.index.IQMethod;
import org.eclipse.cdt.qt.core.index.IQObject;
import org.eclipse.cdt.qt.core.index.IQObject.IMember;
import org.eclipse.cdt.qt.internal.core.QtMethodUtil;
import org.eclipse.cdt.qt.internal.core.pdom.QtPDOMQMethod;
import org.eclipse.core.runtime.CoreException;
public class QMethod implements IQMethod {

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.index;
package org.eclipse.cdt.internal.qt.core.index;
import java.util.ArrayList;
import java.util.Collection;
@ -13,14 +13,14 @@ import java.util.List;
import java.util.Map;
import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.internal.qt.core.pdom.QtPDOMProperty;
import org.eclipse.cdt.internal.qt.core.pdom.QtPDOMQEnum;
import org.eclipse.cdt.internal.qt.core.pdom.QtPDOMQMethod;
import org.eclipse.cdt.internal.qt.core.pdom.QtPDOMQObject;
import org.eclipse.cdt.qt.core.index.IQEnum;
import org.eclipse.cdt.qt.core.index.IQMethod;
import org.eclipse.cdt.qt.core.index.IQObject;
import org.eclipse.cdt.qt.core.index.IQProperty;
import org.eclipse.cdt.qt.internal.core.pdom.QtPDOMProperty;
import org.eclipse.cdt.qt.internal.core.pdom.QtPDOMQEnum;
import org.eclipse.cdt.qt.internal.core.pdom.QtPDOMQMethod;
import org.eclipse.cdt.qt.internal.core.pdom.QtPDOMQObject;
import org.eclipse.core.runtime.CoreException;
public class QObject implements IQObject {

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.index;
package org.eclipse.cdt.internal.qt.core.index;
import java.util.ArrayList;
import java.util.Collection;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.index;
package org.eclipse.cdt.internal.qt.core.index;
import org.eclipse.cdt.qt.core.index.IQObject;
import org.eclipse.cdt.qt.core.index.IQProperty;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.index;
package org.eclipse.cdt.internal.qt.core.index;
import java.util.SortedSet;
import java.util.TreeSet;

View file

@ -5,16 +5,16 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.index;
package org.eclipse.cdt.internal.qt.core.index;
import org.eclipse.cdt.core.dom.ILinkage;
import org.eclipse.cdt.core.dom.ast.IBinding;
import org.eclipse.cdt.core.index.IIndex;
import org.eclipse.cdt.core.index.IIndexBinding;
import org.eclipse.cdt.core.index.IndexFilter;
import org.eclipse.cdt.internal.qt.core.pdom.QtPDOMQObject;
import org.eclipse.cdt.qt.core.index.IQObject;
import org.eclipse.cdt.qt.core.index.QtIndex;
import org.eclipse.cdt.qt.internal.core.pdom.QtPDOMQObject;
import org.eclipse.core.runtime.CoreException;
public class QtIndexImpl extends QtIndex {

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import org.eclipse.cdt.core.dom.ILinkage;
import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
import org.eclipse.cdt.core.dom.ast.IASTName;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import org.eclipse.cdt.core.dom.ILinkage;
import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.core.runtime.CoreException;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import org.eclipse.core.runtime.CoreException;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import org.eclipse.cdt.internal.core.pdom.PDOM;
import org.eclipse.cdt.internal.core.pdom.dom.IPDOMLinkageFactory;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.qt.core.index.IQMethod;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import java.util.ArrayList;
import java.util.LinkedHashMap;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import java.util.ArrayList;
import java.util.Iterator;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
import org.eclipse.cdt.core.dom.ast.IASTImageLocation;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import java.util.ArrayList;
import java.util.HashMap;
@ -35,11 +35,11 @@ import org.eclipse.cdt.core.index.IIndexSymbols;
import org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPInternalBinding;
import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPSemantics;
import org.eclipse.cdt.internal.core.parser.scanner.LocationMap;
import org.eclipse.cdt.internal.qt.core.QtMethodUtil;
import org.eclipse.cdt.internal.qt.core.index.QProperty;
import org.eclipse.cdt.qt.core.QtKeywords;
import org.eclipse.cdt.qt.core.index.IQMethod;
import org.eclipse.cdt.qt.core.index.IQProperty;
import org.eclipse.cdt.qt.internal.core.QtMethodUtil;
import org.eclipse.cdt.qt.internal.core.index.QProperty;
@SuppressWarnings("restriction")
public class QtASTVisitor extends ASTVisitor {

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.core.runtime.CoreException;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import org.eclipse.cdt.core.dom.ILinkage;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import org.eclipse.cdt.internal.core.pdom.db.Database;
import org.eclipse.core.runtime.CoreException;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMBinding;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import java.util.HashMap;
import java.util.Map;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import org.eclipse.cdt.internal.core.index.IIndexBindingConstants;
import org.eclipse.cdt.internal.core.pdom.dom.PDOMNode;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import org.eclipse.cdt.internal.core.pdom.db.Database;
import org.eclipse.cdt.internal.core.pdom.db.IString;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import java.util.Arrays;
import java.util.Collections;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.internal.core.pdom.db.Database;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import java.util.ArrayList;
import java.util.Collections;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import java.util.ArrayList;
import java.util.Arrays;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import org.eclipse.cdt.core.dom.ast.IASTFileLocation;
import org.eclipse.cdt.core.dom.ast.IASTName;

View file

@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.core.pdom;
package org.eclipse.cdt.internal.qt.core.pdom;
import java.util.ArrayList;
import java.util.List;

View file

@ -7,8 +7,8 @@
*/
package org.eclipse.cdt.qt.core.index;
import org.eclipse.cdt.internal.qt.core.index.QtFactory;
import org.eclipse.cdt.qt.core.QtPlugin;
import org.eclipse.cdt.qt.internal.core.index.QtFactory;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;

View file

@ -1,8 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Tests
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.qt.tests
Bundle-Version: 1.0.0.qualifier
Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.eclipse.cdt.qt.tests.QtTestPlugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
@ -17,3 +17,4 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.cdt.ui
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %vendorName

View file

@ -0,0 +1,8 @@
# Copyright (c) 2013 QNX Software Systems 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
pluginName=C/C++ Qt Test Suite
providerName=Eclipse CDT

View file

@ -11,7 +11,7 @@
<relativePath>../../pom.xml</relativePath>
</parent>
<version>1.0.0-SNAPSHOT</version>
<version>1.1.0-SNAPSHOT</version>
<artifactId>org.eclipse.cdt.qt.tests</artifactId>
<packaging>eclipse-test-plugin</packaging>

View file

@ -1,16 +1,16 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: CDT Qt Support UI
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.qt.ui;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-Version: 1.1.0.qualifier
Bundle-Activator: org.eclipse.cdt.qt.ui.QtUIPlugin
Bundle-Vendor: Eclipse CDT
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.cdt.ui,
org.eclipse.cdt.core,
org.eclipse.cdt.qt.core,
org.eclipse.cdt.qt.core;bundle-version="[1.1.0,2.0.0)",
org.eclipse.jface.text,
org.eclipse.core.resources
Bundle-RequiredExecutionEnvironment: JavaSE-1.6

View file

@ -4,5 +4,8 @@
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
pluginName=C/C++ Qt Support UI
providerName=Eclipse CDT
qtHighlighting.extName=Qt Semantic Highlighting
qtHighlighting.displayName=Qt Keywords

View file

@ -29,7 +29,7 @@
name="Qt Completion Proposal Computer">
<completionProposalComputer
categoryId="org.eclipse.cdt.ui.parserProposalCategory"
class="org.eclipse.cdt.qt.internal.ui.QtCompletionProposalComputer"
class="org.eclipse.cdt.internal.qt.ui.QtCompletionProposalComputer"
activate="true">
<partition type="__dftl_partition_content_type"/>
<partition type="__c_preprocessor"/>

View file

@ -11,7 +11,7 @@
<relativePath>../../pom.xml</relativePath>
</parent>
<version>1.0.0-SNAPSHOT</version>
<version>1.1.0-SNAPSHOT</version>
<artifactId>org.eclipse.cdt.qt.ui</artifactId>
<packaging>eclipse-plugin</packaging>
</project>

View file

@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*/
package org.eclipse.cdt.qt.internal.ui;
package org.eclipse.cdt.internal.qt.ui;
import java.util.ArrayList;
import java.util.Collection;
@ -45,6 +45,7 @@ import org.eclipse.cdt.internal.ui.text.contentassist.RelevanceConstants;
import org.eclipse.cdt.qt.core.QtKeywords;
import org.eclipse.cdt.qt.core.QtNature;
import org.eclipse.cdt.qt.core.QtPlugin;
import org.eclipse.cdt.qt.ui.QtUIPlugin;
import org.eclipse.cdt.ui.CUIPlugin;
import org.eclipse.cdt.ui.text.contentassist.ICEditorContentAssistInvocationContext;
import org.eclipse.core.resources.IProject;
@ -324,7 +325,7 @@ public class QtCompletionProposalComputer extends ParsingBasedProposalComputer {
unparsed = context.getDocument().get(parseOffset,
invocationOffset - parseOffset);
} catch (BadLocationException e) {
CCorePlugin.log(e);
QtUIPlugin.log(e);
}
if (unparsed.length() > 0 && unparsed.charAt(0) == '(')

View file

@ -7,6 +7,10 @@
*/
package org.eclipse.cdt.qt.ui;
import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@ -56,4 +60,45 @@ public class QtUIPlugin extends AbstractUIPlugin {
return plugin;
}
public static CoreException coreException(String msg) {
return new CoreException(new Status(IStatus.INFO, PLUGIN_ID, msg));
}
public static IStatus info(String msg) {
return new Status(IStatus.INFO, PLUGIN_ID, msg);
}
public static IStatus error(String msg) {
return error(msg, null);
}
public static IStatus error(String msg, Throwable e) {
return new Status(IStatus.ERROR, PLUGIN_ID, msg, e);
}
public static void log(String e) {
log(IStatus.INFO, e, null);
}
public static void log(Throwable e) {
String msg= e.getMessage();
if (msg == null) {
log("Error", e); //$NON-NLS-1$
} else {
log("Error: " + msg, e); //$NON-NLS-1$
}
}
public static void log(String message, Throwable e) {
Throwable nestedException;
if (e instanceof CModelException
&& (nestedException = ((CModelException)e).getException()) != null) {
e = nestedException;
}
log(IStatus.ERROR, message, e);
}
public static void log(int code, String msg, Throwable e) {
getDefault().getLog().log(new Status(code, PLUGIN_ID, msg, e));
}
}