mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
Patch for Bogdan.
This commit is contained in:
parent
dbc6ab4f98
commit
04fd4de249
3 changed files with 20 additions and 6 deletions
|
@ -1,3 +1,6 @@
|
||||||
|
2003-08-11 Andrew Niefer
|
||||||
|
- Added some code to CUIPlugin to access working copies
|
||||||
|
|
||||||
2003-08-10 Sean Evoy
|
2003-08-10 Sean Evoy
|
||||||
Added a new target for building DLLs on Cygwin.
|
Added a new target for building DLLs on Cygwin.
|
||||||
* plugin.xml
|
* plugin.xml
|
||||||
|
|
|
@ -20,9 +20,8 @@ import org.eclipse.cdt.core.search.ICSearchConstants;
|
||||||
import org.eclipse.cdt.core.search.ICSearchPattern;
|
import org.eclipse.cdt.core.search.ICSearchPattern;
|
||||||
import org.eclipse.cdt.core.search.ICSearchScope;
|
import org.eclipse.cdt.core.search.ICSearchScope;
|
||||||
import org.eclipse.cdt.core.search.SearchEngine;
|
import org.eclipse.cdt.core.search.SearchEngine;
|
||||||
import org.eclipse.cdt.internal.core.model.IWorkingCopy;
|
|
||||||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
import org.eclipse.core.resources.IWorkspace;
|
import org.eclipse.core.resources.IWorkspace;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
@ -65,8 +64,8 @@ public class CSearchOperation extends WorkspaceModifyOperation implements ICSear
|
||||||
throws CoreException, InvocationTargetException, InterruptedException
|
throws CoreException, InvocationTargetException, InterruptedException
|
||||||
{
|
{
|
||||||
_collector.setProgressMonitor( monitor );
|
_collector.setProgressMonitor( monitor );
|
||||||
IWorkingCopy copy = null;
|
|
||||||
SearchEngine engine = new SearchEngine( );
|
SearchEngine engine = new SearchEngine( CUIPlugin.getSharedWorkingCopies() );
|
||||||
if( _elementPattern != null ){
|
if( _elementPattern != null ){
|
||||||
engine.search( _workspace, _elementPattern, _limitTo, _scope, _collector );
|
engine.search( _workspace, _elementPattern, _limitTo, _scope, _collector );
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -19,6 +19,8 @@ import java.util.ResourceBundle;
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.model.CoreModel;
|
import org.eclipse.cdt.core.model.CoreModel;
|
||||||
import org.eclipse.cdt.core.model.ICElement;
|
import org.eclipse.cdt.core.model.ICElement;
|
||||||
|
import org.eclipse.cdt.internal.core.model.IBufferFactory;
|
||||||
|
import org.eclipse.cdt.internal.core.model.IWorkingCopy;
|
||||||
import org.eclipse.cdt.internal.ui.BuildConsoleManager;
|
import org.eclipse.cdt.internal.ui.BuildConsoleManager;
|
||||||
import org.eclipse.cdt.internal.ui.CElementAdapterFactory;
|
import org.eclipse.cdt.internal.ui.CElementAdapterFactory;
|
||||||
import org.eclipse.cdt.internal.ui.CPluginImages;
|
import org.eclipse.cdt.internal.ui.CPluginImages;
|
||||||
|
@ -86,6 +88,17 @@ public class CUIPlugin extends AbstractUIPlugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static IBufferFactory getBufferFactory() {
|
||||||
|
CDocumentProvider provider= CUIPlugin.getDefault().getDocumentProvider();
|
||||||
|
if (provider != null)
|
||||||
|
return provider.getBufferFactory();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IWorkingCopy[] getSharedWorkingCopies() {
|
||||||
|
return CCorePlugin.getSharedWorkingCopies(getBufferFactory());
|
||||||
|
}
|
||||||
|
|
||||||
public static String getResourceString(String key) {
|
public static String getResourceString(String key) {
|
||||||
try {
|
try {
|
||||||
return fgResourceBundle.getString(key);
|
return fgResourceBundle.getString(key);
|
||||||
|
@ -357,5 +370,4 @@ public class CUIPlugin extends AbstractUIPlugin {
|
||||||
manager.unregisterAdapters(fResourceAdapterFactory);
|
manager.unregisterAdapters(fResourceAdapterFactory);
|
||||||
manager.unregisterAdapters(fCElementAdapterFactory);
|
manager.unregisterAdapters(fCElementAdapterFactory);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue