mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-07 16:26:11 +02:00
Cleanup obsolete extension points
This commit is contained in:
parent
7c19d235c2
commit
ef7458bcf9
10 changed files with 12 additions and 532 deletions
|
@ -1,5 +1,5 @@
|
|||
###############################################################################
|
||||
# Copyright (c) 2003, 2007 IBM Corporation and others.
|
||||
# Copyright (c) 2003, 2008 IBM Corporation 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
|
||||
|
@ -26,9 +26,6 @@ ErrorParser.name=Error Parser
|
|||
BinaryParser.name=Binary Parser
|
||||
PathEntryStore.name=Path Entry Store
|
||||
ScannerInfoProvider.name=Scanner Information Provider
|
||||
CLanguage.name= CDT Language
|
||||
CFileType.name= CDT File Type
|
||||
CFileTypeAssociation.name= CDT File Type Association
|
||||
CIndexer.name= C/C++ Indexer
|
||||
language.name= CDT Language
|
||||
|
||||
|
@ -72,8 +69,6 @@ fragmentName.solaris = C/C++ Development Tools Core for Solaris
|
|||
fragmentName.win32 = C/C++ Development Tools Core for Windows
|
||||
fragmentName.macosx = C/C++ Development Tools Core for MacOS X
|
||||
|
||||
DefaultCodeFormatter.name=Default Formatter
|
||||
|
||||
cSourceName=C Source File
|
||||
cHeaderName=C Header File
|
||||
cxxSourceName=C++ Source File
|
||||
|
|
|
@ -32,12 +32,6 @@
|
|||
<!-- =================================================================================== -->
|
||||
<extension-point id="ScannerInfoProvider" name="%ScannerInfoProvider.name"/>
|
||||
<!-- =================================================================================== -->
|
||||
<!-- Extension Point: CFileType and CFileTypeAssociation for translation unit ident -->
|
||||
<!-- =================================================================================== -->
|
||||
<extension-point id="CLanguage" name="%CLanguage.name" schema="schema/CLanguage.exsd"/>
|
||||
<extension-point id="CFileType" name="%CFileType.name" />
|
||||
<extension-point id="CFileTypeAssociation" name="%CFileTypeAssociation.name" />
|
||||
<!-- =================================================================================== -->
|
||||
<!-- PathEntryContainer initialization, this is part of the IPathEntry framework -->
|
||||
<!-- =================================================================================== -->
|
||||
<extension-point id="PathEntryContainerInitializer" name="%PathEntryContainerInitializer" schema="schema/PathEntryContainerInitializer.exsd"/>
|
||||
|
@ -236,81 +230,6 @@
|
|||
</application>
|
||||
</extension>
|
||||
<!-- =================================================================================== -->
|
||||
<!-- CDT file type mappings -->
|
||||
<!-- =================================================================================== -->
|
||||
<!--extension
|
||||
point="org.eclipse.cdt.core.CLanguage">
|
||||
<language
|
||||
name="C"
|
||||
id="org.eclipse.cdt.core.language.c">
|
||||
</language>
|
||||
<language
|
||||
name="C++"
|
||||
id="org.eclipse.cdt.core.language.cxx">
|
||||
</language>
|
||||
<language
|
||||
name="%fileTypeMapping.AssemblyLanguage"
|
||||
id="org.eclipse.cdt.core.language.asm">
|
||||
</language>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.cdt.core.CFileType">
|
||||
<fileType
|
||||
name="%fileTypeMapping.cSourceFile"
|
||||
type="source"
|
||||
id="org.eclipse.cdt.core.fileType.c_source"
|
||||
language="org.eclipse.cdt.core.language.c">
|
||||
</fileType>
|
||||
<fileType
|
||||
name="%fileTypeMapping.cHeaderFile"
|
||||
type="header"
|
||||
id="org.eclipse.cdt.core.fileType.c_header"
|
||||
language="org.eclipse.cdt.core.language.c">
|
||||
</fileType>
|
||||
<fileType
|
||||
name="%fileTypeMapping.cppSourceFile"
|
||||
type="source"
|
||||
id="org.eclipse.cdt.core.fileType.cxx_source"
|
||||
language="org.eclipse.cdt.core.language.cxx">
|
||||
</fileType>
|
||||
<fileType
|
||||
name="%fileTypeMapping.cppHeaderFile"
|
||||
type="header"
|
||||
id="org.eclipse.cdt.core.fileType.cxx_header"
|
||||
language="org.eclipse.cdt.core.language.cxx">
|
||||
</fileType>
|
||||
<fileType
|
||||
name="%fileTypeMapping.assemblySourceFile"
|
||||
type="source"
|
||||
id="org.eclipse.cdt.core.fileType.asm_source"
|
||||
language="org.eclipse.cdt.core.language.asm">
|
||||
</fileType>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.cdt.core.CFileTypeAssociation">
|
||||
<association
|
||||
type="org.eclipse.cdt.core.fileType.c_source"
|
||||
pattern="*.c">
|
||||
</association>
|
||||
<association
|
||||
type="org.eclipse.cdt.core.fileType.c_header"
|
||||
pattern="*.h">
|
||||
</association>
|
||||
<association
|
||||
type="org.eclipse.cdt.core.fileType.cxx_source"
|
||||
pattern="*.cpp,*.cxx,*.cc,*.C">
|
||||
</association>
|
||||
<association
|
||||
file="template/cpp_headers"
|
||||
type="org.eclipse.cdt.core.fileType.cxx_header"
|
||||
pattern="*.hpp,*.hxx,*.hh,*.H">
|
||||
</association>
|
||||
<association
|
||||
type="org.eclipse.cdt.core.fileType.asm_source"
|
||||
pattern="*.asm,*.s,*.S">
|
||||
</association>
|
||||
</extension-->
|
||||
<!-- =================================================================================== -->
|
||||
<!-- Some well known C file extensions override for the team plugins -->
|
||||
<!-- =================================================================================== -->
|
||||
<extension
|
||||
|
@ -450,19 +369,6 @@
|
|||
</super>
|
||||
</extension>
|
||||
|
||||
<!-- =================================================================================== -->
|
||||
<!-- Code Formatter extension point -->
|
||||
<!-- =================================================================================== -->
|
||||
<!--extension
|
||||
id="codeFormatters"
|
||||
name="%CodeFormatters.name"
|
||||
point="org.eclipse.cdt.core.CodeFormatter">
|
||||
<codeFormatter
|
||||
class="org.eclipse.cdt.internal.formatter.DefaultCodeFormatter"
|
||||
name="%DefaultCodeFormatter.name"
|
||||
id="org.eclipse.cdt.core.defaultCodeFormatter"/>
|
||||
</extension-->
|
||||
|
||||
<!-- =================================================================================== -->
|
||||
<!-- Define C/C++ files ContentTypes -->
|
||||
<!-- =================================================================================== -->
|
||||
|
|
|
@ -1,123 +0,0 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!-- Schema file written by PDE -->
|
||||
<schema targetNamespace="org.eclipse.cdt.core">
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.schema plugin="org.eclipse.cdt.core" id="CLanguage" name="CLanguage"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
Extension point representing a CDT language. At the moment, languages consist of a unique identifier (id), and a human-readable name.
|
||||
|
||||
By themselves, languages don't serve much purpose. However, they are used to build file types (see the CFileType extension point), which are used by CDT to classify files and determine how they should be processed.
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<element name="extension">
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.element deprecated="true" replacement="org.eclipse.cdt.core.language" />
|
||||
</appInfo>
|
||||
</annotation>
|
||||
<complexType>
|
||||
<sequence>
|
||||
<element ref="language" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</sequence>
|
||||
<attribute name="point" type="string" use="required">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="id" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="name" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<element name="language">
|
||||
<complexType>
|
||||
<attribute name="name" type="string" use="required">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="id" type="string" use="required">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.section type="since"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
CDT 2.0
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.section type="examples"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
To declare a new language:
|
||||
|
||||
<extension
|
||||
point="org.eclipse.cdt.core.CLanguage">
|
||||
<language
|
||||
name="My Language"
|
||||
id="com.example.product.language.my_language">
|
||||
</language>
|
||||
</extension>
|
||||
|
||||
This indicates to CDT that there is a new language, identified using the language id "com.example.product.language.my_language".
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.section type="apiInfo"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
This extension point is purely declarative.
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.section type="implementation"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.section type="copyright"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
</schema>
|
|
@ -1,5 +1,5 @@
|
|||
###############################################################################
|
||||
# Copyright (c) 2003, 2007 IBM Corporation and others.
|
||||
# Copyright (c) 2003, 2008 IBM Corporation 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
|
||||
|
@ -18,8 +18,6 @@ elementFiltersName=CElement Filters
|
|||
binaryParserPage=Binary Parser Page
|
||||
pathContainerPage=Path Container Page
|
||||
textHoversName=Text Hovers
|
||||
editorActionsName=Editor Actions
|
||||
editorRulerActionsName=Editor Ruler Actions
|
||||
cHelpProviderName=C Help Provider
|
||||
nature.name=C Nature
|
||||
perspective.name=C/C++
|
||||
|
@ -27,12 +25,6 @@ viewsCategory.name=&C/C++
|
|||
CView.name=C/C++ Projects
|
||||
cPropertyTabName=New CDT Model Property Tab
|
||||
|
||||
ToggleCommentAction.label= Togg&le Comment
|
||||
|
||||
AddBlockCommentAction.label= Add &Block Comment
|
||||
|
||||
RemoveBlockCommentAction.label= Remove Bloc&k Comment
|
||||
|
||||
# The Wizards
|
||||
# C
|
||||
newCWizardsCategory.name=C
|
||||
|
@ -221,7 +213,6 @@ ActionDefinition.showQuickTypeHierarchy.description= Shows quick type hierarchy
|
|||
|
||||
CElementWorkingSetPage.name = C/C++
|
||||
|
||||
CEditorFontDefinition.description = The C/C++ editor text font is used by C/C++ editors.
|
||||
BuildConsoleFontDefinition.description= The C-Build console font is used by the C-Build console
|
||||
BuildConsoleFontDefinition.label= C-Build Console Text Font
|
||||
|
||||
|
@ -290,7 +281,7 @@ defaultPathContainerPage=Default Path Container
|
|||
|
||||
## CEditor Fonts
|
||||
CEditorFontDefiniton.label= C/C++ Editor Text Font
|
||||
CEditorFontDefintion.description= The editor text font is used by C/C++ editors.
|
||||
CEditorFontDefinition.description = The C/C++ editor text font is used by C/C++ editors.
|
||||
#--- presentation
|
||||
CPresentation.label= C/C++
|
||||
CEditorPresentation.label= Editor
|
||||
|
@ -350,14 +341,10 @@ defaultFoldingStructureProviderName= Default C Folding
|
|||
Folding.label= F&olding
|
||||
|
||||
# Merge fonts
|
||||
cCompareFontDefiniton.label= C/C++ compare text font
|
||||
cCompareFontDefiniton.description= The C/C++ compare text font is used by Assembly compare/merge tools.
|
||||
asmCompareFontDefiniton.label= Assembly compare text font
|
||||
asmCompareFontDefiniton.description= The Assembly compare text font is used by Assembly compare/merge tools.
|
||||
|
||||
# External Search Editor
|
||||
|
||||
ExternalSearchEditor.name=External Search Editor
|
||||
cCompareFontDefinition.label= C/C++ compare text font
|
||||
cCompareFontDefinition.description= The C/C++ compare text font is used by C/C++ compare/merge tools.
|
||||
asmCompareFontDefinition.label= Assembly compare text font
|
||||
asmCompareFontDefinition.description= The Assembly compare text font is used by Assembly compare/merge tools.
|
||||
|
||||
#--- templates
|
||||
c.contextType.name = C/C++
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
<!-- =========================================================================== -->
|
||||
<extension-point id="textHovers" name="%textHoversName" schema="schema/textHovers.exsd"/>
|
||||
<extension-point id="IndexerPage" name="%indexerPage.name" schema="schema/IndexerPage.exsd"/>
|
||||
<extension-point id="completionContributors" name="%completionContributors" schema="schema/completionContributors.exsd"/>
|
||||
<extension-point id="ProposalFilter" name="%proposalFilter.name" schema="schema/ProposalFilter.exsd"/>
|
||||
<extension-point id="completionProposalComputer" name="%completionProposalComputer" schema="schema/completionProposalComputer.exsd"/>
|
||||
<extension-point id="newCfgDialog" name="%NewCfgDialog.name" schema="schema/newCfgDialog.exsd"/>
|
||||
|
@ -561,13 +560,6 @@
|
|||
id="org.eclipse.cdt.ui.editor.asm.AsmEditor">
|
||||
<contentTypeBinding contentTypeId="org.eclipse.cdt.core.asmSource"/>
|
||||
</editor>
|
||||
<!-- deprecated -->
|
||||
<editor
|
||||
symbolicFontName="org.eclipse.cdt.ui.editors.textfont"
|
||||
class="org.eclipse.cdt.internal.ui.editor.ExternalSearchEditor"
|
||||
icon="icons/obj16/c_file_obj.gif"
|
||||
name="%ExternalSearchEditor.name"
|
||||
id="org.eclipse.cdt.ui.editor.ExternalSearchEditor"/>
|
||||
<editor
|
||||
class="org.eclipse.cdt.internal.ui.editor.DefaultBinaryFileEditor"
|
||||
default="false"
|
||||
|
@ -603,21 +595,21 @@
|
|||
</description>
|
||||
</fontDefinition>
|
||||
<fontDefinition
|
||||
label="%cCompareFontDefiniton.label"
|
||||
label="%cCompareFontDefinition.label"
|
||||
defaultsTo="org.eclipse.cdt.ui.editors.textfont"
|
||||
categoryId="org.eclipse.compare.contentmergeviewer.TextMergeViewer"
|
||||
id="org.eclipse.cdt.internal.ui.compare.CMergeViewer">
|
||||
<description>
|
||||
%cCompareFontDefiniton.description
|
||||
%cCompareFontDefinition.description
|
||||
</description>
|
||||
</fontDefinition>
|
||||
<fontDefinition
|
||||
label="%asmCompareFontDefiniton.label"
|
||||
label="%asmCompareFontDefinition.label"
|
||||
defaultsTo="org.eclipse.cdt.ui.editors.textfont"
|
||||
categoryId="org.eclipse.compare.contentmergeviewer.TextMergeViewer"
|
||||
id="org.eclipse.cdt.internal.ui.compare.AsmMergeViewer">
|
||||
<description>
|
||||
%asmCompareFontDefiniton.description
|
||||
%asmCompareFontDefinition.description
|
||||
</description>
|
||||
</fontDefinition>
|
||||
<colorDefinition
|
||||
|
@ -1947,17 +1939,6 @@
|
|||
</completionProposalComputer>
|
||||
</extension>
|
||||
|
||||
<!-- legacy completions (completionContributors) -->
|
||||
<extension
|
||||
point="org.eclipse.cdt.ui.completionProposalComputer"
|
||||
id="LegacyCompletionProposalComputer">
|
||||
<completionProposalComputer
|
||||
class="org.eclipse.cdt.internal.ui.text.contentassist.LegacyCompletionProposalComputer"
|
||||
categoryId="org.eclipse.cdt.ui.parserProposalCategory">
|
||||
<partition type="__dftl_partition_content_type"/>
|
||||
<partition type="__c_preprocessor"/>
|
||||
</completionProposalComputer>
|
||||
</extension>
|
||||
<extension
|
||||
id="KeywordCompletionProposalComputer"
|
||||
point="org.eclipse.cdt.ui.completionProposalComputer">
|
||||
|
|
|
@ -1,124 +0,0 @@
|
|||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!-- Schema file written by PDE -->
|
||||
<schema targetNamespace="org.eclipse.cdt.ui">
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.schema plugin="org.eclipse.cdt.ui" id="completionContributor" name="Completion Contributor"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
[Enter description of this extension point.]
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<element name="extension">
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.element deprecated="true" replacement="completionProposalComputer" />
|
||||
</appInfo>
|
||||
</annotation>
|
||||
<complexType>
|
||||
<sequence>
|
||||
<element ref="contributor" minOccurs="1" maxOccurs="unbounded"/>
|
||||
</sequence>
|
||||
<attribute name="point" type="string" use="required">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="id" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="name" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
<appInfo>
|
||||
<meta.attribute translatable="true"/>
|
||||
</appInfo>
|
||||
</annotation>
|
||||
</attribute>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<element name="contributor">
|
||||
<complexType>
|
||||
<attribute name="id" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="class" type="string" use="required">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
<appInfo>
|
||||
<meta.attribute kind="java" basedOn="org.eclipse.cdt.ui.text.contentassist.ICompletionContributor"/>
|
||||
</appInfo>
|
||||
</annotation>
|
||||
</attribute>
|
||||
<attribute name="priority" type="string">
|
||||
<annotation>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
</attribute>
|
||||
</complexType>
|
||||
</element>
|
||||
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.section type="since"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
[Enter the first release in which this extension point appears.]
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.section type="examples"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
[Enter extension point usage example here.]
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.section type="apiInfo"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
[Enter API information here.]
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.section type="implementation"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
[Enter information about supplied implementation of this extension point.]
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
<annotation>
|
||||
<appInfo>
|
||||
<meta.section type="copyright"/>
|
||||
</appInfo>
|
||||
<documentation>
|
||||
|
||||
</documentation>
|
||||
</annotation>
|
||||
|
||||
</schema>
|
|
@ -1,41 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2006 IBM Corporation 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:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.ui.editor;
|
||||
|
||||
import org.eclipse.jface.action.ActionContributionItem;
|
||||
import org.eclipse.jface.action.IContributionItem;
|
||||
import org.eclipse.jface.action.IMenuManager;
|
||||
|
||||
import org.eclipse.cdt.ui.CUIPlugin;
|
||||
|
||||
/**
|
||||
* @deprecated Use {@link org.eclipse.cdt.internal.ui.util.EditorUtility#openInEditor(org.eclipse.core.runtime.IPath, org.eclipse.cdt.core.model.ICElement) EditorUtility#openInEditor()}
|
||||
* to open an external file.
|
||||
*/
|
||||
public class ExternalSearchEditor extends CEditor {
|
||||
|
||||
public static final String EDITOR_ID = "org.eclipse.cdt.ui.editor.ExternalSearchEditor"; //$NON-NLS-1$
|
||||
|
||||
public ExternalSearchEditor(){
|
||||
super();
|
||||
setDocumentProvider(CUIPlugin.getDefault().getExternalSearchDocumentProvider());
|
||||
}
|
||||
|
||||
public void editorContextMenuAboutToShow(IMenuManager menu) {
|
||||
super.editorContextMenuAboutToShow(menu);
|
||||
IContributionItem[] contrItem = menu.getItems();
|
||||
for (int i=0; i<contrItem.length; i++){
|
||||
if (contrItem[i] instanceof ActionContributionItem)
|
||||
((ActionContributionItem) contrItem[i]).getAction().setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007 Wind River Systems, 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:
|
||||
* Anton Leherbauer (Wind River Systems) - initial API and implementation
|
||||
* Bryan Wilkinson (QNX)
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.internal.ui.text.contentassist;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IConfigurationElement;
|
||||
import org.eclipse.core.runtime.IExtension;
|
||||
import org.eclipse.core.runtime.IExtensionPoint;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
import org.eclipse.jface.text.ITextViewer;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.ASTCompletionNode;
|
||||
import org.eclipse.cdt.core.dom.ast.IASTCompletionNode;
|
||||
import org.eclipse.cdt.core.model.IWorkingCopy;
|
||||
import org.eclipse.cdt.ui.CUIPlugin;
|
||||
|
||||
/**
|
||||
* A proposal computer for handling the legacy extensions from the
|
||||
* <tt>org.eclipse.cdt.core.completionContributors</tt> extension point.
|
||||
*
|
||||
* @since 4.0
|
||||
*/
|
||||
public class LegacyCompletionProposalComputer extends ParsingBasedProposalComputer {
|
||||
|
||||
/**
|
||||
* Default constructor is required (executable extension).
|
||||
*/
|
||||
public LegacyCompletionProposalComputer() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated this is for backwards compatibility, only.
|
||||
*/
|
||||
protected List computeCompletionProposals(
|
||||
CContentAssistInvocationContext context,
|
||||
IASTCompletionNode completionNode, String prefix) throws CoreException {
|
||||
|
||||
if (!(completionNode instanceof ASTCompletionNode)) {
|
||||
// unsupported IASTCompletionNode implementation
|
||||
return Collections.EMPTY_LIST;
|
||||
}
|
||||
if (context.isContextInformationStyle()) {
|
||||
// context information cannot be supported by completionContributors
|
||||
return Collections.EMPTY_LIST;
|
||||
}
|
||||
ITextViewer viewer = context.getViewer();
|
||||
int offset = context.getInvocationOffset();
|
||||
IWorkingCopy workingCopy = context.getTranslationUnit().getWorkingCopy();
|
||||
|
||||
List proposals = new ArrayList();
|
||||
|
||||
IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(CUIPlugin.PLUGIN_ID, "completionContributors"); //$NON-NLS-1$
|
||||
if (point == null)
|
||||
return null;
|
||||
IExtension[] extensions = point.getExtensions();
|
||||
for (int i = 0; i < extensions.length; ++i) {
|
||||
IConfigurationElement[] elements = extensions[i].getConfigurationElements();
|
||||
for (int j = 0; j < elements.length; ++j) {
|
||||
IConfigurationElement element = elements[j];
|
||||
if (!"contributor".equals(element.getName())) //$NON-NLS-1$
|
||||
continue;
|
||||
Object contribObject = element.createExecutableExtension("class"); //$NON-NLS-1$
|
||||
if (!(contribObject instanceof org.eclipse.cdt.ui.text.contentassist.ICompletionContributor))
|
||||
continue;
|
||||
org.eclipse.cdt.ui.text.contentassist.ICompletionContributor contributor = (org.eclipse.cdt.ui.text.contentassist.ICompletionContributor)contribObject;
|
||||
contributor.contributeCompletionProposals(viewer, offset,
|
||||
workingCopy, (ASTCompletionNode) completionNode,
|
||||
prefix, proposals);
|
||||
}
|
||||
}
|
||||
|
||||
return proposals;
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2003, 2007 IBM Corporation and others.
|
||||
* Copyright (c) 2003, 2008 IBM Corporation 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
|
||||
|
@ -82,7 +82,6 @@ import org.eclipse.cdt.internal.ui.buildconsole.BuildConsoleManager;
|
|||
import org.eclipse.cdt.internal.ui.editor.ASTProvider;
|
||||
import org.eclipse.cdt.internal.ui.editor.CDocumentProvider;
|
||||
import org.eclipse.cdt.internal.ui.editor.CustomBufferFactory;
|
||||
import org.eclipse.cdt.internal.ui.editor.ExternalSearchDocumentProvider;
|
||||
import org.eclipse.cdt.internal.ui.editor.SharedTextColors;
|
||||
import org.eclipse.cdt.internal.ui.editor.WorkingCopyManager;
|
||||
import org.eclipse.cdt.internal.ui.editor.asm.AsmTextTools;
|
||||
|
@ -345,7 +344,6 @@ public class CUIPlugin extends AbstractUIPlugin {
|
|||
|
||||
private CoreModel fCoreModel;
|
||||
private CDocumentProvider fDocumentProvider;
|
||||
private ExternalSearchDocumentProvider fExternalDocumentProvider;
|
||||
private IBufferFactory fBufferFactory;
|
||||
private WorkingCopyManager fWorkingCopyManager;
|
||||
private CTextTools fTextTools;
|
||||
|
@ -402,15 +400,6 @@ public class CUIPlugin extends AbstractUIPlugin {
|
|||
return fDocumentProvider;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the used external search document provider
|
||||
*/
|
||||
public synchronized ExternalSearchDocumentProvider getExternalSearchDocumentProvider() {
|
||||
if (fExternalDocumentProvider == null) {
|
||||
fExternalDocumentProvider = new ExternalSearchDocumentProvider();
|
||||
}
|
||||
return fExternalDocumentProvider;
|
||||
}
|
||||
/**
|
||||
* Returns the working copy manager
|
||||
* @return IWorkingCopyManager
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
<topic label="org.eclipse.cdt.core.CConfigurationDataProvider" href="reference/extension-points/org_eclipse_cdt_core_CConfigurationDataProvider.html"/>
|
||||
<topic label="org.eclipse.cdt.core.CIndex" href="reference/extension-points/org_eclipse_cdt_core_CIndex.html"/>
|
||||
<topic label="org.eclipse.cdt.core.CIndexer" href="reference/extension-points/org_eclipse_cdt_core_CIndexer.html"/>
|
||||
<topic label="org.eclipse.cdt.core.CLanguage" href="reference/extension-points/org_eclipse_cdt_core_CLanguage.html"/>
|
||||
<topic label="org.eclipse.cdt.core.CodeFormatter" href="reference/extension-points/org_eclipse_cdt_core_CodeFormatter.html"/>
|
||||
<topic label="org.eclipse.cdt.core.CProject" href="reference/extension-points/org_eclipse_cdt_core_CProject.html"/>
|
||||
<topic label="org.eclipse.cdt.core.externalSettingsProvider" href="reference/extension-points/org_eclipse_cdt_core_externalSettingsProvider.html"/>
|
||||
|
@ -49,7 +48,6 @@
|
|||
<topic label="org.eclipse.cdt.managedbuilder.ui.newWizardPages" href="reference/extension-points/org_eclipse_cdt_managedbuilder_ui_newWizardPages.html"/>
|
||||
<topic label="org.eclipse.cdt.ui.CDTWizard" href="reference/extension-points/org_eclipse_cdt_ui_CDTWizard.html"/>
|
||||
<topic label="org.eclipse.cdt.ui.CHelpProvider" href="reference/extension-points/org_eclipse_cdt_ui_CHelpProvider.html"/>
|
||||
<topic label="org.eclipse.cdt.ui.completionContributors" href="reference/extension-points/org_eclipse_cdt_ui_completionContributors.html"/>
|
||||
<topic label="org.eclipse.cdt.ui.completionProposalComputer" href="reference/extension-points/org_eclipse_cdt_ui_completionProposalComputer.html"/>
|
||||
<topic label="org.eclipse.cdt.ui.ConfigManager" href="reference/extension-points/org_eclipse_cdt_ui_ConfigManager.html"/>
|
||||
<topic label="org.eclipse.cdt.ui.cPropertyTab" href="reference/extension-points/org_eclipse_cdt_ui_cPropertyTab.html"/>
|
||||
|
|
Loading…
Add table
Reference in a new issue