mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Patch for Bogdan Gheorghe.
Here's a patch that creates and manages a CDT log file in the .metadata\.plugins\org.eclipse.cdt.core folder. This log file, for now, will contain indexer failure messages and parser failure messages - particularly inclusion failures. These messages were being logged to the PDE error log which, given the number of failures that we can expect on some files, was filling up rather quickly. I put a 5MB limit on the CDT log file after which it gets deleted and a new one gets created. The intent of this log file is to help a user figure out why something isn't being indexed properly - the usual reasons are: i) can't find an include file, ii) symbols not defined. Also in this patch are 2 minor UI fixes: i) dedicated to Brent - Ctrl+H now brings up the C++ Search Dialog for all C Editor supported extensions, and ii) especially for Alain - F3 will perform a Open Declarations.
This commit is contained in:
parent
5fccc34b0a
commit
46a9e7fd6f
18 changed files with 325 additions and 16 deletions
|
@ -1,3 +1,17 @@
|
|||
2003-09-30 Bogdan Gheorghe
|
||||
|
||||
- Created CDTLogWriter class
|
||||
- Added CDTLogWriter startup/shutdown to CCorePlugin
|
||||
- Changed Util class to make use of ICLogConstants to distinguish
|
||||
between PDE and CDT logs.
|
||||
- Modified the Buffer class to log errors to the CDT log
|
||||
|
||||
* src/org/eclipse/cdt/core/CCorePlugin.java
|
||||
* src/org/eclipse/cdt/core/ICLogConstants.java
|
||||
* src/org/eclipse/cdt/internal/core/CDTLogWriter.java
|
||||
* model/org/eclipse/cdt/internal/core/model/Util.java
|
||||
* model/org/eclipse/cdt/internal/core/model/Buffer.java
|
||||
|
||||
2003-09-25 Bogdan Gheorghe
|
||||
|
||||
- Got rid of refs to old dependency service; restructured
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
2003-09-30 Bogdan Gheorghe
|
||||
Changed logging for SourceIndexer to log file in cdt.core
|
||||
|
||||
2003-09-25 Bogdan Gheorghe
|
||||
Integrated the dependency service into the indexer. Changes
|
||||
as follows:
|
||||
|
|
|
@ -19,6 +19,7 @@ import java.io.IOException;
|
|||
import java.io.StringReader;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.ICLogConstants;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.parser.IParser;
|
||||
import org.eclipse.cdt.core.parser.IScannerInfo;
|
||||
|
@ -89,7 +90,7 @@ public class SourceIndexer extends AbstractIndexer {
|
|||
boolean retVal = parser.parse();
|
||||
|
||||
if (!retVal)
|
||||
org.eclipse.cdt.internal.core.model.Util.log(null, "Failed to index " + resourceFile.getFullPath());
|
||||
org.eclipse.cdt.internal.core.model.Util.log(null, "Failed to index " + resourceFile.getFullPath(), ICLogConstants.CDT);
|
||||
|
||||
if (AbstractIndexer.VERBOSE){
|
||||
if (!retVal)
|
||||
|
|
|
@ -14,6 +14,7 @@ package org.eclipse.cdt.internal.core.model;
|
|||
import java.io.ByteArrayInputStream;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.eclipse.cdt.core.ICLogConstants;
|
||||
import org.eclipse.cdt.core.model.*;
|
||||
import org.eclipse.cdt.core.model.CModelException;
|
||||
import org.eclipse.cdt.core.model.IOpenable;
|
||||
|
@ -224,7 +225,7 @@ public class Buffer implements IBuffer {
|
|||
final IBufferChangedListener listener = (IBufferChangedListener) this.changeListeners.get(i);
|
||||
Platform.run(new ISafeRunnable() {
|
||||
public void handleException(Throwable exception) {
|
||||
Util.log(exception, "Exception occurred in listener of buffer change notification"); //$NON-NLS-1$
|
||||
Util.log(exception, "Exception occurred in listener of buffer change notification", ICLogConstants.CDT); //$NON-NLS-1$
|
||||
}
|
||||
public void run() throws Exception {
|
||||
listener.bufferChanged(event);
|
||||
|
|
|
@ -13,6 +13,7 @@ import java.io.InputStreamReader;
|
|||
import java.text.MessageFormat;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.ICLogConstants;
|
||||
import org.eclipse.cdt.core.model.CModelException;
|
||||
import org.eclipse.cdt.core.model.ICModelStatusConstants;
|
||||
import org.eclipse.cdt.internal.core.model.IDebugLogConstants.DebugLogConstant;
|
||||
|
@ -21,7 +22,7 @@ import org.eclipse.core.runtime.CoreException;
|
|||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
|
||||
public class Util {
|
||||
public class Util implements ICLogConstants {
|
||||
|
||||
public static boolean VERBOSE_PARSER = false;
|
||||
public static boolean VERBOSE_MODEL = false;
|
||||
|
@ -151,33 +152,38 @@ public class Util {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a log entry
|
||||
*/
|
||||
public static void log(Throwable e, String message) {
|
||||
public static void log(Throwable e, String message, LogConst logType) {
|
||||
IStatus status= new Status(
|
||||
IStatus.ERROR,
|
||||
CCorePlugin.getDefault().getDescriptor().getUniqueIdentifier(),
|
||||
IStatus.ERROR,
|
||||
message,
|
||||
e);
|
||||
Util.log(status);
|
||||
Util.log(status, logType);
|
||||
}
|
||||
|
||||
public static void log(IStatus status){
|
||||
CCorePlugin.getDefault().getLog().log(status);
|
||||
public static void log(IStatus status, LogConst logType){
|
||||
if (logType.equals(ICLogConstants.PDE)){
|
||||
CCorePlugin.getDefault().getLog().log(status);
|
||||
}
|
||||
else if (logType.equals(ICLogConstants.CDT)){
|
||||
CCorePlugin.getDefault().cdtLog.log(status);
|
||||
}
|
||||
}
|
||||
|
||||
public static void log(String message){
|
||||
public static void log(String message, LogConst logType){
|
||||
IStatus status = new Status(IStatus.INFO,
|
||||
CCorePlugin.getDefault().getDescriptor().getUniqueIdentifier(),
|
||||
IStatus.INFO,
|
||||
message,
|
||||
null);
|
||||
Util.log(status);
|
||||
Util.log(status, logType);
|
||||
}
|
||||
|
||||
|
||||
public static void debugLog(String message, DebugLogConstant client) {
|
||||
if( CCorePlugin.getDefault() == null ) return;
|
||||
if ( CCorePlugin.getDefault().isDebugging() && isActive(client)) {
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
2003-09-30 Bogdan Gheorghe
|
||||
Added CDT log dump in Parser.fetchToken to catch HandleInclusion failures
|
||||
2003-09-30 John Camelon
|
||||
Fixed Bug 43503 : Search:f_SD_01 cannot be found in ManyClasses20 Project
|
||||
Fixed Bug 43680 : Fix Parser Error Handling
|
||||
|
|
|
@ -14,6 +14,7 @@ import java.util.Iterator;
|
|||
import java.util.List;
|
||||
import java.util.Stack;
|
||||
|
||||
import org.eclipse.cdt.core.ICLogConstants;
|
||||
import org.eclipse.cdt.core.parser.Backtrack;
|
||||
import org.eclipse.cdt.core.parser.EndOfFile;
|
||||
import org.eclipse.cdt.core.parser.IParser;
|
||||
|
@ -4987,6 +4988,7 @@ public class Parser implements IParser
|
|||
catch (ScannerException e)
|
||||
{
|
||||
Util.debugLog( "ScannerException thrown : " + e.getMessage(), IDebugLogConstants.PARSER );
|
||||
org.eclipse.cdt.internal.core.model.Util.log(e, "Scanner Exception", ICLogConstants.CDT); //$NON-NLS-1$h
|
||||
if( e.isSeriousError(mode) )
|
||||
{
|
||||
failParse();
|
||||
|
|
|
@ -12,6 +12,7 @@ package org.eclipse.cdt.internal.core.parser;
|
|||
|
||||
import java.io.Reader;
|
||||
|
||||
import org.eclipse.cdt.core.ICLogConstants;
|
||||
import org.eclipse.cdt.core.parser.EndOfFile;
|
||||
import org.eclipse.cdt.core.parser.IPreprocessor;
|
||||
import org.eclipse.cdt.core.parser.IProblemReporter;
|
||||
|
@ -48,7 +49,7 @@ public class Preprocessor extends Scanner implements IPreprocessor {
|
|||
catch( ScannerException se )
|
||||
{
|
||||
// callback IProblem here
|
||||
org.eclipse.cdt.internal.core.model.Util.log(se, "Preprocessor Exception"); //$NON-NLS-1$h
|
||||
org.eclipse.cdt.internal.core.model.Util.log(se, "Preprocessor Exception", ICLogConstants.CDT); //$NON-NLS-1$h
|
||||
|
||||
}
|
||||
catch( EndOfFile eof )
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
2003-09-30 Bogdan Gheorghe
|
||||
- changed logging in JobManager to use new ICLogConstants
|
||||
|
||||
2003-09-30 Andrew Niefer
|
||||
-fix bug43862 - Cannot find macro delcarations using all occurences.
|
||||
* modified CSearchPattern.createMacroPattern
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
*/
|
||||
package org.eclipse.cdt.internal.core.search.processing;
|
||||
|
||||
import org.eclipse.cdt.core.ICLogConstants;
|
||||
import org.eclipse.cdt.internal.core.Util;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.OperationCanceledException;
|
||||
|
@ -382,7 +383,7 @@ public abstract class JobManager implements Runnable {
|
|||
} catch (RuntimeException e) {
|
||||
if (this.thread != null) { // if not shutting down
|
||||
// log exception
|
||||
org.eclipse.cdt.internal.core.model.Util.log(e, "Background Indexer Crash Recovery"); //$NON-NLS-1$
|
||||
org.eclipse.cdt.internal.core.model.Util.log(e, "Background Indexer Crash Recovery", ICLogConstants.PDE); //$NON-NLS-1$
|
||||
|
||||
// keep job manager alive
|
||||
this.discardJobs(null);
|
||||
|
@ -393,7 +394,7 @@ public abstract class JobManager implements Runnable {
|
|||
} catch (Error e) {
|
||||
if (this.thread != null && !(e instanceof ThreadDeath)) {
|
||||
// log exception
|
||||
org.eclipse.cdt.internal.core.model.Util.log(e, "Background Indexer Crash Recovery"); //$NON-NLS-1$
|
||||
org.eclipse.cdt.internal.core.model.Util.log(e, "Background Indexer Crash Recovery", ICLogConstants.PDE); //$NON-NLS-1$
|
||||
|
||||
// keep job manager alive
|
||||
this.discardJobs(null);
|
||||
|
|
|
@ -20,6 +20,7 @@ import org.eclipse.cdt.core.model.CoreModel;
|
|||
import org.eclipse.cdt.core.parser.IScannerInfoProvider;
|
||||
import org.eclipse.cdt.core.resources.IConsole;
|
||||
import org.eclipse.cdt.core.search.SearchEngine;
|
||||
import org.eclipse.cdt.internal.core.CDTLogWriter;
|
||||
import org.eclipse.cdt.internal.core.CDescriptorManager;
|
||||
import org.eclipse.cdt.internal.core.CPathEntry;
|
||||
import org.eclipse.cdt.internal.core.model.BufferManager;
|
||||
|
@ -113,7 +114,7 @@ public class CCorePlugin extends Plugin {
|
|||
* @see #getDefaultOptions
|
||||
*/
|
||||
public static final String CORE_ENCODING = PLUGIN_ID + ".encoding"; //$NON-NLS-1$
|
||||
|
||||
public CDTLogWriter cdtLog = null;
|
||||
|
||||
private static CCorePlugin fgCPlugin;
|
||||
private static ResourceBundle fgResourceBundle;
|
||||
|
@ -211,6 +212,10 @@ public class CCorePlugin extends Plugin {
|
|||
if (fCoreModel != null) {
|
||||
fCoreModel.shutdown();
|
||||
}
|
||||
|
||||
if (cdtLog != null) {
|
||||
cdtLog.shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -218,7 +223,9 @@ public class CCorePlugin extends Plugin {
|
|||
*/
|
||||
public void startup() throws CoreException {
|
||||
super.startup();
|
||||
|
||||
|
||||
cdtLog = new CDTLogWriter(CCorePlugin.getDefault().getStateLocation().append(".log").toFile());
|
||||
|
||||
//Set debug tracing options
|
||||
CCorePlugin.getDefault().configurePluginDebugOptions();
|
||||
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
/**********************************************************************
|
||||
* Copyright (c) 2002,2003 Rational Software Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Common Public License v0.5
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/cpl-v05.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM Rational Software - Initial API and implementation
|
||||
***********************************************************************/
|
||||
|
||||
package org.eclipse.cdt.core;
|
||||
|
||||
/**
|
||||
* @author bgheorgh
|
||||
*/
|
||||
public interface ICLogConstants {
|
||||
public class LogConst{
|
||||
private LogConst( int value )
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
private final int value;
|
||||
}
|
||||
|
||||
|
||||
public static final LogConst PDE = new LogConst( 1 );
|
||||
|
||||
public static final LogConst CDT = new LogConst( 2 );
|
||||
|
||||
}
|
|
@ -0,0 +1,209 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2003 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Common Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/cpl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.io.Writer;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
|
||||
|
||||
public class CDTLogWriter {
|
||||
protected File logFile = null;
|
||||
protected Writer log = null;
|
||||
protected boolean newSession = true;
|
||||
|
||||
protected static final String SESSION = "*** SESSION";//$NON-NLS-1$
|
||||
protected static final String ENTRY = "*** ENTRY";//$NON-NLS-1$
|
||||
protected static final String SUBENTRY = "*** SUBENTRY";//$NON-NLS-1$
|
||||
protected static final String MESSAGE = "*** MESSAGE";//$NON-NLS-1$
|
||||
protected static final String STACK = "*** STACK";//$NON-NLS-1$
|
||||
|
||||
protected static final String LINE_SEPARATOR;
|
||||
protected static final String TAB_STRING = "\t";//$NON-NLS-1$
|
||||
protected static final long MAXLOG_SIZE = 5000000;
|
||||
static {
|
||||
String s = System.getProperty("line.separator");//$NON-NLS-1$
|
||||
LINE_SEPARATOR = s == null ? "\n" : s;//$NON-NLS-1$
|
||||
}
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public CDTLogWriter(File log) {
|
||||
this.logFile = log;
|
||||
if(log.length() > MAXLOG_SIZE){
|
||||
log.delete();
|
||||
this.logFile = CCorePlugin.getDefault().getStateLocation().append(".log").toFile();
|
||||
}
|
||||
openLogFile();
|
||||
}
|
||||
|
||||
protected void closeLogFile() throws IOException {
|
||||
try {
|
||||
if (log != null) {
|
||||
log.flush();
|
||||
log.close();
|
||||
}
|
||||
} finally {
|
||||
log = null;
|
||||
}
|
||||
}
|
||||
|
||||
protected void openLogFile() {
|
||||
try {
|
||||
log = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(logFile.getAbsolutePath(), true), "UTF-8"));//$NON-NLS-1$
|
||||
if (newSession) {
|
||||
writeHeader();
|
||||
newSession = false;
|
||||
}
|
||||
} catch (IOException e) {
|
||||
// there was a problem opening the log file so log to the console
|
||||
//log = logForStream(System.err);
|
||||
}
|
||||
}
|
||||
protected void writeHeader() throws IOException {
|
||||
write(SESSION);
|
||||
writeSpace();
|
||||
String date = getDate();
|
||||
write(date);
|
||||
writeSpace();
|
||||
for (int i=SESSION.length()+date.length(); i<78; i++) {
|
||||
write("-");//$NON-NLS-1$
|
||||
}
|
||||
writeln();
|
||||
}
|
||||
|
||||
protected String getDate() {
|
||||
try {
|
||||
DateFormat formatter = new SimpleDateFormat("MMM dd, yyyy HH:mm:ss.SS"); //$NON-NLS-1$
|
||||
return formatter.format(new Date());
|
||||
} catch (Exception e) {
|
||||
// If there were problems writing out the date, ignore and
|
||||
// continue since that shouldn't stop us from losing the rest
|
||||
// of the information
|
||||
}
|
||||
return Long.toString(System.currentTimeMillis());
|
||||
}
|
||||
protected Writer logForStream(OutputStream output) {
|
||||
try {
|
||||
return new BufferedWriter(new OutputStreamWriter(output, "UTF-8"));//$NON-NLS-1$
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
return new BufferedWriter(new OutputStreamWriter(output));
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Writes the given string to the log, followed by the line terminator string.
|
||||
*/
|
||||
protected void writeln(String s) throws IOException {
|
||||
write(s);
|
||||
writeln();
|
||||
}
|
||||
/**
|
||||
* Shuts down the log.
|
||||
*/
|
||||
public synchronized void shutdown() {
|
||||
try {
|
||||
if (logFile != null) {
|
||||
closeLogFile();
|
||||
logFile = null;
|
||||
} else {
|
||||
if (log != null) {
|
||||
Writer old = log;
|
||||
log = null;
|
||||
old.flush();
|
||||
old.close();
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
//we've shutdown the log, so not much else we can do!
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
protected void write(Throwable throwable) throws IOException {
|
||||
if (throwable == null)
|
||||
return;
|
||||
write(STACK);
|
||||
writeSpace();
|
||||
boolean isCoreException = throwable instanceof CoreException;
|
||||
if (isCoreException)
|
||||
writeln("1");//$NON-NLS-1$
|
||||
else
|
||||
writeln("0");//$NON-NLS-1$
|
||||
throwable.printStackTrace(new PrintWriter(log));
|
||||
if (isCoreException) {
|
||||
CoreException e = (CoreException) throwable;
|
||||
write(e.getStatus(), 0);
|
||||
}
|
||||
}
|
||||
|
||||
public synchronized void log(IStatus status){
|
||||
try {
|
||||
this.write(status, 0);
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
protected void write(IStatus status, int depth) throws IOException {
|
||||
if (depth == 0) {
|
||||
write(ENTRY);
|
||||
} else {
|
||||
write(SUBENTRY);
|
||||
writeSpace();
|
||||
write(Integer.toString(depth));
|
||||
}
|
||||
writeSpace();
|
||||
write(status.getPlugin());
|
||||
writeSpace();
|
||||
write(Integer.toString(status.getSeverity()));
|
||||
writeSpace();
|
||||
write(Integer.toString(status.getCode()));
|
||||
writeSpace();
|
||||
write(getDate());
|
||||
writeln();
|
||||
|
||||
write(MESSAGE);
|
||||
writeSpace();
|
||||
writeln(status.getMessage());
|
||||
|
||||
write(status.getException());
|
||||
|
||||
if (status.isMultiStatus()) {
|
||||
IStatus[] children = status.getChildren();
|
||||
for (int i = 0; i < children.length; i++) {
|
||||
write(children[i], depth+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void writeln() throws IOException {
|
||||
write(LINE_SEPARATOR);
|
||||
}
|
||||
protected void write(String message) throws IOException {
|
||||
if (message != null)
|
||||
log.write(message);
|
||||
}
|
||||
protected void writeSpace() throws IOException {
|
||||
write(" ");//$NON-NLS-1$
|
||||
}
|
||||
|
||||
}
|
|
@ -1,3 +1,7 @@
|
|||
2003-09-30 Bogdan Gheorghe
|
||||
- Added F3 key binding for the Open Declarations Action
|
||||
- Bug 42047: Added Ctrl+H binding for the C++ Search Dialog
|
||||
|
||||
2003-09-30 Andrew Niefer
|
||||
Bug 43923 - Search: Results pane title missing Working Set's name
|
||||
- implement CSearchUtil.toString( IWorkingSet [] )
|
||||
|
|
|
@ -51,6 +51,9 @@ ActionDefinition.comment.description= Turn the selected lines into // style comm
|
|||
ActionDefinition.uncomment.name= Uncomment
|
||||
ActionDefinition.uncomment.description= Uncomment the selected // style comment lines
|
||||
|
||||
ActionDefinition.opendecl.name= Open Declaration
|
||||
ActionDefinition.opendecl.description= Open an editor on the selected element's declaration(s)
|
||||
|
||||
CEditor.name=C Editor
|
||||
CPluginPreferencePage.name=C/C++
|
||||
CPluginEditorPreferencePage.name=C/C++ Editor
|
||||
|
|
|
@ -386,6 +386,18 @@
|
|||
command="org.eclipse.cdt.ui.edit.text.c.uncomment"
|
||||
configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
|
||||
</keyBinding>
|
||||
<command
|
||||
name="%ActionDefinition.opendecl.name"
|
||||
description="%ActionDefinition.opendecl.description"
|
||||
category="org.eclipse.cdt.ui.category.source"
|
||||
id="org.eclipse.cdt.ui.edit.opendecl">
|
||||
</command>
|
||||
<keyBinding
|
||||
string="F3"
|
||||
scope="org.eclipse.cdt.ui.cEditorScope"
|
||||
command="org.eclipse.cdt.ui.edit.opendecl"
|
||||
configuration="org.eclipse.ui.defaultAcceleratorConfiguration">
|
||||
</keyBinding>
|
||||
</extension>
|
||||
<extension
|
||||
id="org.eclipse.cdt.ui.CSearchPage"
|
||||
|
@ -394,6 +406,7 @@
|
|||
<page
|
||||
showScopeSection="true"
|
||||
label="%CSearchPage.label"
|
||||
extensions="c:90,cpp:90, cxx:90, cc:90, h:90, hh:90, hpp:90"
|
||||
icon="icons/full/obj16/csearch_obj.gif"
|
||||
class="org.eclipse.cdt.internal.ui.search.CSearchPage"
|
||||
sizeHint="460, 160"
|
||||
|
|
|
@ -435,7 +435,10 @@ public class CEditor extends TextEditor implements ISelectionChangedListener {
|
|||
setAction("ContentAssistTip", action);
|
||||
|
||||
setAction("AddIncludeOnSelection", new AddIncludeOnSelectionAction(this)); //$NON-NLS-1$
|
||||
setAction("OpenDeclarations", new OpenDeclarationsAction(this));
|
||||
|
||||
action = new OpenDeclarationsAction(this);
|
||||
action.setActionDefinitionId(ICEditorActionDefinitionIds.OPEN_DECL);
|
||||
setAction("OpenDeclarations", action);
|
||||
|
||||
fFileSearchAction = new FileSearchAction(getSelectionProvider());
|
||||
|
||||
|
|
|
@ -47,6 +47,11 @@ public interface ICEditorActionDefinitionIds extends ITextEditorActionDefinition
|
|||
* (value <code>"org.eclipse.cdt.ui.edit.text.java.toggle.presentation"</code>).
|
||||
*/
|
||||
public static final String TOGGLE_PRESENTATION= "org.eclipse.cdt.ui.edit.text.c.toggle.presentation"; //$NON-NLS-1$
|
||||
/**
|
||||
* Action definition ID of the open declaration action
|
||||
* (value <code>"org.eclipse.cdt.ui.edit.text.java.toggle.presentation"</code>).
|
||||
*/
|
||||
public static final String OPEN_DECL= "org.eclipse.cdt.ui.edit.opendecl"; //$NON-NLS-1$
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue