Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] Bug 42929, 42047 fix

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.

Integration Suite run on Windows + Linux

- Bogdan


Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/ChangeLog,v
retrieving revision 1.155
diff -u -r1.155 ChangeLog
--- ChangeLog	26 Sep 2003 17:53:31 -0000	1.155
+++ ChangeLog	1 Oct 2003 12:55:50 -0000
@@ -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
Index: index/ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/index/ChangeLog,v
retrieving revision 1.21
diff -u -r1.21 ChangeLog
--- index/ChangeLog	26 Sep 2003 17:53:31 -0000	1.21
+++ index/ChangeLog	1 Oct 2003 12:55:50 -0000
@@ -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:
Index: index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexer.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexer.java,v
retrieving revision 1.11
diff -u -r1.11 SourceIndexer.java
--- index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexer.java	26 Sep 2003 17:53:31 -0000	1.11
+++ index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexer.java	1 Oct 2003 12:55:50 -0000
@@ -19,6 +19,7 @@
 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 @@
 			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)
Index: model/org/eclipse/cdt/internal/core/model/Buffer.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Buffer.java,v
retrieving revision 1.2
diff -u -r1.2 Buffer.java
--- model/org/eclipse/cdt/internal/core/model/Buffer.java	27 Mar 2003 16:05:18 -0000	1.2
+++ model/org/eclipse/cdt/internal/core/model/Buffer.java	1 Oct 2003 12:55:50 -0000
@@ -14,6 +14,7 @@
 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 @@
 				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);
Index: model/org/eclipse/cdt/internal/core/model/Util.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/model/org/eclipse/cdt/internal/core/model/Util.java,v
retrieving revision 1.6
diff -u -r1.6 Util.java
--- model/org/eclipse/cdt/internal/core/model/Util.java	26 Aug 2003 19:15:58 -0000	1.6
+++ model/org/eclipse/cdt/internal/core/model/Util.java	1 Oct 2003 12:55:50 -0000
@@ -13,6 +13,7 @@
 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.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,32 +152,37 @@
 			}
 		}
 	}
-	
 	/*
 	 * 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;
Index: parser/ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/ChangeLog,v
retrieving revision 1.146
diff -u -r1.146 ChangeLog
--- parser/ChangeLog	30 Sep 2003 20:42:24 -0000	1.146
+++ parser/ChangeLog	1 Oct 2003 12:55:50 -0000
@@ -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 
Index: parser/org/eclipse/cdt/internal/core/parser/Parser.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Parser.java,v
retrieving revision 1.117
diff -u -r1.117 Parser.java
--- parser/org/eclipse/cdt/internal/core/parser/Parser.java	30 Sep 2003 20:42:23 -0000	1.117
+++ parser/org/eclipse/cdt/internal/core/parser/Parser.java	1 Oct 2003 12:55:52 -0000
@@ -14,6 +14,7 @@
 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 @@
         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(); 
Index: parser/org/eclipse/cdt/internal/core/parser/Preprocessor.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/parser/Preprocessor.java,v
retrieving revision 1.7
diff -u -r1.7 Preprocessor.java
--- parser/org/eclipse/cdt/internal/core/parser/Preprocessor.java	9 Sep 2003 17:53:51 -0000	1.7
+++ parser/org/eclipse/cdt/internal/core/parser/Preprocessor.java	1 Oct 2003 12:55:52 -0000
@@ -12,6 +12,7 @@
 
 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 @@
 		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 )
Index: search/ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/search/ChangeLog,v
retrieving revision 1.34
diff -u -r1.34 ChangeLog
--- search/ChangeLog	30 Sep 2003 18:18:22 -0000	1.34
+++ search/ChangeLog	1 Oct 2003 12:55:52 -0000
@@ -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
Index: search/org/eclipse/cdt/internal/core/search/processing/JobManager.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/search/org/eclipse/cdt/internal/core/search/processing/JobManager.java,v
retrieving revision 1.4
diff -u -r1.4 JobManager.java
--- search/org/eclipse/cdt/internal/core/search/processing/JobManager.java	12 Aug 2003 20:20:04 -0000	1.4
+++ search/org/eclipse/cdt/internal/core/search/processing/JobManager.java	1 Oct 2003 12:55:52 -0000
@@ -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 @@
 		} 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 @@
 		} 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);
Index: src/org/eclipse/cdt/core/CCorePlugin.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePlugin.java,v
retrieving revision 1.34
diff -u -r1.34 CCorePlugin.java
--- src/org/eclipse/cdt/core/CCorePlugin.java	26 Sep 2003 17:53:31 -0000	1.34
+++ src/org/eclipse/cdt/core/CCorePlugin.java	1 Oct 2003 12:55:52 -0000
@@ -20,6 +20,7 @@
 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 @@
      * @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 @@
 		if (fCoreModel != null) {
 			fCoreModel.shutdown();
 		}
+		
+		if (cdtLog != null) {
+		   cdtLog.shutdown();
+		}
 	}
 
 	/**
@@ -218,7 +223,9 @@
 	 */
 	public void startup() throws CoreException {
 		super.startup();
-
+		
+		cdtLog = new CDTLogWriter(CCorePlugin.getDefault().getStateLocation().append(".log").toFile());
+		
 		//Set debug tracing options
 		CCorePlugin.getDefault().configurePluginDebugOptions();
 		
Index: src/org/eclipse/cdt/core/ICLogConstants.java
===================================================================
RCS file: src/org/eclipse/cdt/core/ICLogConstants.java
diff -N src/org/eclipse/cdt/core/ICLogConstants.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ src/org/eclipse/cdt/core/ICLogConstants.java	1 Oct 2003 12:55:52 -0000
@@ -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 );
+   
+}
Index: src/org/eclipse/cdt/internal/core/CDTLogWriter.java
===================================================================
RCS file: src/org/eclipse/cdt/internal/core/CDTLogWriter.java
diff -N src/org/eclipse/cdt/internal/core/CDTLogWriter.java
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ src/org/eclipse/cdt/internal/core/CDTLogWriter.java	1 Oct 2003 12:55:52 -0000
@@ -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$
+	}
+
+}
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui/ChangeLog,v
retrieving revision 1.199
diff -u -r1.199 ChangeLog
--- ChangeLog	30 Sep 2003 18:25:50 -0000	1.199
+++ ChangeLog	1 Oct 2003 12:56:08 -0000
@@ -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 [] )
Index: plugin.properties
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui/plugin.properties,v
retrieving revision 1.27
diff -u -r1.27 plugin.properties
--- plugin.properties	16 Sep 2003 20:45:41 -0000	1.27
+++ plugin.properties	1 Oct 2003 12:56:08 -0000
@@ -51,6 +51,9 @@
 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
Index: plugin.xml
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui/plugin.xml,v
retrieving revision 1.50
diff -u -r1.50 plugin.xml
--- plugin.xml	25 Sep 2003 13:45:12 -0000	1.50
+++ plugin.xml	1 Oct 2003 12:56:08 -0000
@@ -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"
Index: src/org/eclipse/cdt/internal/ui/editor/CEditor.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/CEditor.java,v
retrieving revision 1.31
diff -u -r1.31 CEditor.java
--- src/org/eclipse/cdt/internal/ui/editor/CEditor.java	26 Sep 2003 15:25:45 -0000	1.31
+++ src/org/eclipse/cdt/internal/ui/editor/CEditor.java	1 Oct 2003 12:56:08 -0000
@@ -435,7 +435,10 @@
 		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());
 		
Index: src/org/eclipse/cdt/internal/ui/editor/ICEditorActionDefinitionIds.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/ICEditorActionDefinitionIds.java,v
retrieving revision 1.2
diff -u -r1.2 ICEditorActionDefinitionIds.java
--- src/org/eclipse/cdt/internal/ui/editor/ICEditorActionDefinitionIds.java	5 Apr 2003 02:04:45 -0000	1.2
+++ src/org/eclipse/cdt/internal/ui/editor/ICEditorActionDefinitionIds.java	1 Oct 2003 12:56:08 -0000
@@ -47,6 +47,11 @@
 	 * (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$
 
 
 }

Back to the top