mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-06 17:26:01 +02:00
Patch for Bogda Gheorghe: (44366 & 45324)
- Moved off all dependency calculations to the Indexer thread, created a new UpdateDependency job - Modified CSearchOperation to only lock the workspace when tagging resources with markers.
This commit is contained in:
parent
5df215664c
commit
92669e0062
21 changed files with 1121 additions and 894 deletions
|
@ -1,298 +1,301 @@
|
||||||
2003-10-03 Sean Evoy
|
2003-10-23 Bogdan Gheorghe
|
||||||
Fix for critical bug 44134.
|
Updated the indexManager.perfomConcurrentJob call in MakefileGenerator
|
||||||
|
|
||||||
The problem lies in how the makefile is generated when a build target
|
2003-10-03 Sean Evoy
|
||||||
references other projects. The makefile creates a command to change to
|
Fix for critical bug 44134.
|
||||||
the build directory of the referenced project and call $(MAKE) there, i.e.
|
|
||||||
cd <dep_project_build_dir>; $(MAKE) clean all
|
The problem lies in how the makefile is generated when a build target
|
||||||
|
references other projects. The makefile creates a command to change to
|
||||||
The problem arises when the directory change fails. As of RC0, the command
|
the build directory of the referenced project and call $(MAKE) there, i.e.
|
||||||
after the semi-colon is evaluated. Unfortunately, it evaluates to a recursive
|
cd <dep_project_build_dir>; $(MAKE) clean all
|
||||||
make call in the build directory of the build target and 'make' will keep
|
|
||||||
invoking more 'make's until Eclipse runs out of memory. With a manual build,
|
The problem arises when the directory change fails. As of RC0, the command
|
||||||
the user can still cancel the build. When autobuild is turned on, they cannot.
|
after the semi-colon is evaluated. Unfortunately, it evaluates to a recursive
|
||||||
The only way to shut down Eclipse under that scenario is to kill it, and when
|
make call in the build directory of the build target and 'make' will keep
|
||||||
it restarts, autobuild is still enabled and the problem repeats.
|
invoking more 'make's until Eclipse runs out of memory. With a manual build,
|
||||||
|
the user can still cancel the build. When autobuild is turned on, they cannot.
|
||||||
The solution is to NOT perform the 'make' command if the 'cd' fails, i.e.
|
The only way to shut down Eclipse under that scenario is to kill it, and when
|
||||||
cd <dep_project_build_dir> && $(MAKE) clean all
|
it restarts, autobuild is still enabled and the problem repeats.
|
||||||
|
|
||||||
When the dependencies are generated this way, the 'cd' will fail as will the
|
The solution is to NOT perform the 'make' command if the 'cd' fails, i.e.
|
||||||
build. The final tweak is to ignore the 'cd' failure and allow the rest of
|
cd <dep_project_build_dir> && $(MAKE) clean all
|
||||||
the build to continue, i.e.
|
|
||||||
-cd <dep_project_build_dir> && $(MAKE) clean all
|
When the dependencies are generated this way, the 'cd' will fail as will the
|
||||||
|
build. The final tweak is to ignore the 'cd' failure and allow the rest of
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
the build to continue, i.e.
|
||||||
|
-cd <dep_project_build_dir> && $(MAKE) clean all
|
||||||
2003-10-01 Sean Evoy
|
|
||||||
Final fix for bugs 44020.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
||||||
The problem lay with the way that new projects were being created when the
|
|
||||||
root configuration of the project had tool references overriding options.
|
2003-10-01 Sean Evoy
|
||||||
What the new configuration should have been doing is making a personal copy
|
Final fix for bugs 44020.
|
||||||
of the tool reference and its options. Instead, they were all sharing the
|
The problem lay with the way that new projects were being created when the
|
||||||
parents. Seems simple enough now that I found it.
|
root configuration of the project had tool references overriding options.
|
||||||
|
What the new configuration should have been doing is making a personal copy
|
||||||
OptionReference provides a method to retreive its option (so new
|
of the tool reference and its options. Instead, they were all sharing the
|
||||||
OptionReferences can be cloned).
|
parents. Seems simple enough now that I found it.
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
|
|
||||||
|
OptionReference provides a method to retreive its option (so new
|
||||||
Configuration now behaves correctly when it is created from another configuration.
|
OptionReferences can be cloned).
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
|
* src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
|
||||||
|
|
||||||
2003-10-01 Sean Evoy
|
Configuration now behaves correctly when it is created from another configuration.
|
||||||
Fix for bugs 43490 (trivial), 44020, and 43980.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
|
||||||
Added a new field to the schema for a tool. The attribute manages a list of
|
|
||||||
project natures that the tool should be filtered against in the build model
|
2003-10-01 Sean Evoy
|
||||||
and UI.
|
Fix for bugs 43490 (trivial), 44020, and 43980.
|
||||||
* schema/ManagedBuildTools.exsd
|
Added a new field to the schema for a tool. The attribute manages a list of
|
||||||
|
project natures that the tool should be filtered against in the build model
|
||||||
Updated the ITool interface and its mplementors to pay attention to this new
|
and UI.
|
||||||
attribute when loading from a plugin file. Clients can querry for a numeric
|
* schema/ManagedBuildTools.exsd
|
||||||
constant indicating the filter.
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ITool.java
|
Updated the ITool interface and its mplementors to pay attention to this new
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
|
attribute when loading from a plugin file. Clients can querry for a numeric
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
|
constant indicating the filter.
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/core/ITool.java
|
||||||
All the methods in managed build manager that access information stored in a tool
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
|
||||||
first check that the tool is valid for the project nature.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
|
||||||
|
All the methods in managed build manager that access information stored in a tool
|
||||||
Put a safety check in the option reference constructor when reading one in from
|
first check that the tool is valid for the project nature.
|
||||||
a project file. I the option reference is to an option not managed by the build
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
||||||
model, the constructor does not add itself to the runtime representation of the
|
|
||||||
model.
|
Put a safety check in the option reference constructor when reading one in from
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
|
a project file. I the option reference is to an option not managed by the build
|
||||||
|
model, the constructor does not add itself to the runtime representation of the
|
||||||
In preparation for 44020, each new target created is assigned a truly random ID.
|
model.
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
* src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
|
||||||
|
|
||||||
2003-09-30 Sean Evoy
|
In preparation for 44020, each new target created is assigned a truly random ID.
|
||||||
Fix for bug 41826.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
||||||
|
|
||||||
Finished the use case for changing header files and triggering a build. I had
|
2003-09-30 Sean Evoy
|
||||||
to add a new attribute to the build model schema to allow a build information
|
Fix for bug 41826.
|
||||||
client to determine that a file is considered a header file.
|
|
||||||
* schema/ManagedBuildTools.exsd
|
Finished the use case for changing header files and triggering a build. I had
|
||||||
|
to add a new attribute to the build model schema to allow a build information
|
||||||
The ITool, and its implementors now have a method to test if an extension is
|
client to determine that a file is considered a header file.
|
||||||
considered to belong to a header file. The Tool also pays attention to the new
|
* schema/ManagedBuildTools.exsd
|
||||||
attribute when it reads itself in from the plugin file.
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ITool.java
|
The ITool, and its implementors now have a method to test if an extension is
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
|
considered to belong to a header file. The Tool also pays attention to the new
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
|
attribute when it reads itself in from the plugin file.
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/core/ITool.java
|
||||||
There is a method for clients of this information on the BuildInfo interface and
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
|
||||||
its implementor.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
There is a method for clients of this information on the BuildInfo interface and
|
||||||
|
its implementor.
|
||||||
The builder had to be tweaked in order to behave correctly on a build of an
|
* src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java
|
||||||
empty project or non-managed projects.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
|
||||||
|
The builder had to be tweaked in order to behave correctly on a build of an
|
||||||
The makefile generator had to be tweaked to properly add folders that are effected
|
empty project or non-managed projects.
|
||||||
by header file changes.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
|
||||||
|
The makefile generator had to be tweaked to properly add folders that are effected
|
||||||
2003-09-26 Sean Evoy
|
by header file changes.
|
||||||
A partial implementation for bug 41826. This patch contains the logic to properly
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
||||||
respond in the face of the following project changes:
|
|
||||||
|
2003-09-26 Sean Evoy
|
||||||
1. A generated project element, such as the build target or an intermediate file,
|
A partial implementation for bug 41826. This patch contains the logic to properly
|
||||||
is deleted in the build project, or any projects it references.
|
respond in the face of the following project changes:
|
||||||
2. The build settings change in the build project or any projects it
|
|
||||||
references.
|
1. A generated project element, such as the build target or an intermediate file,
|
||||||
|
is deleted in the build project, or any projects it references.
|
||||||
In order to actually do this correctly, I had to stop being so precious during the
|
2. The build settings change in the build project or any projects it
|
||||||
build. The makefile generator was was calculating the "build needed" state as it
|
references.
|
||||||
walked the change delta. However, the Eclipse core has already determined that I
|
|
||||||
need to do a build. Further, as I discovered earlier, it doesn't always pass what
|
In order to actually do this correctly, I had to stop being so precious during the
|
||||||
has changed in referenced projects as part of the delta. Essentially, that means I
|
build. The makefile generator was was calculating the "build needed" state as it
|
||||||
will never be able to fully calculate the change set in the makefile generator's
|
walked the change delta. However, the Eclipse core has already determined that I
|
||||||
delta visitor, and to even approximate a decent set of cases, the logic would quickly
|
need to do a build. Further, as I discovered earlier, it doesn't always pass what
|
||||||
bog down in complexity.
|
has changed in referenced projects as part of the delta. Essentially, that means I
|
||||||
|
will never be able to fully calculate the change set in the makefile generator's
|
||||||
The solution is to trust Eclipse and alway invoke make when my incremental builder
|
delta visitor, and to even approximate a decent set of cases, the logic would quickly
|
||||||
is called. At worst, if there is no significant change, make will execute and
|
bog down in complexity.
|
||||||
report nothing to be done.
|
|
||||||
|
The solution is to trust Eclipse and alway invoke make when my incremental builder
|
||||||
The modified makefile builder no longer asks the makefile generator if it should
|
is called. At worst, if there is no significant change, make will execute and
|
||||||
build. It also no longer cares if the change set is empty (make will report that).
|
report nothing to be done.
|
||||||
Since it responds to changes in referenced project's build information, it also
|
|
||||||
scrubs all relevant projects after building. Since a build might involve building
|
The modified makefile builder no longer asks the makefile generator if it should
|
||||||
referenced project elements, those projects get their project views refreshed after
|
build. It also no longer cares if the change set is empty (make will report that).
|
||||||
build. The build markers for referenced projects are removed prior to build.
|
Since it responds to changes in referenced project's build information, it also
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
scrubs all relevant projects after building. Since a build might involve building
|
||||||
|
referenced project elements, those projects get their project views refreshed after
|
||||||
The makefile generator has been simplified. The resource delta visitor logic no
|
build. The build markers for referenced projects are removed prior to build.
|
||||||
longer trie to decide if a build should occur. The method to ask has been removed.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
||||||
The class no longer throws an exception if the change set is empty. I am also a bit
|
|
||||||
more careful to call make with the right targets if a referenced project is built.
|
The makefile generator has been simplified. The resource delta visitor logic no
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
longer trie to decide if a build should occur. The method to ask has been removed.
|
||||||
|
The class no longer throws an exception if the change set is empty. I am also a bit
|
||||||
2003-09-26 Sean Evoy
|
more careful to call make with the right targets if a referenced project is built.
|
||||||
I added a fix to the builder and makefile generator to properly handle the following case.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
||||||
Project A depends on Project B. Something changes in project B and the user requests
|
|
||||||
that A be built. Inthis case, the incremental builder is invoked, but it is passed a
|
2003-09-26 Sean Evoy
|
||||||
0-length delta on the top resource. Now, the logic of the builder is to treat that case as a
|
I added a fix to the builder and makefile generator to properly handle the following case.
|
||||||
build event that triggers no makefile regeneration, just an invocation of make.
|
Project A depends on Project B. Something changes in project B and the user requests
|
||||||
|
that A be built. Inthis case, the incremental builder is invoked, but it is passed a
|
||||||
Now handles the case where there is no flag applied to the make command and just
|
0-length delta on the top resource. Now, the logic of the builder is to treat that case as a
|
||||||
passes the targets as arguments.
|
build event that triggers no makefile regeneration, just an invocation of make.
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
|
||||||
|
Now handles the case where there is no flag applied to the make command and just
|
||||||
The makefile generator now considers the case where the delta is for a project resource
|
passes the targets as arguments.
|
||||||
and has no children. If so, it flags that a build is needed but no makefile generation
|
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
||||||
occurs. It also throws a new exception if the top makefile is not saved.
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
The makefile generator now considers the case where the delta is for a project resource
|
||||||
|
and has no children. If so, it flags that a build is needed but no makefile generation
|
||||||
2003-09-25 Sean Evoy
|
occurs. It also throws a new exception if the top makefile is not saved.
|
||||||
A patch to resolve the problem with refreshing the project after a build, or
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
||||||
bug 42522 if you care about those sorts of things. The managed make builder was
|
|
||||||
calling refresh at inside a bad if statement. I corrected that and projects
|
2003-09-25 Sean Evoy
|
||||||
refresh correctly. Of course, if you have the wrong binary parser selected you are
|
A patch to resolve the problem with refreshing the project after a build, or
|
||||||
hosed. You will also notice that the string constants have been changed to
|
bug 42522 if you care about those sorts of things. The managed make builder was
|
||||||
resolve to a different name. The standard builder uses this name and I wanted
|
calling refresh at inside a bad if statement. I corrected that and projects
|
||||||
to minimize the possibility of problems later.
|
refresh correctly. Of course, if you have the wrong binary parser selected you are
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
hosed. You will also notice that the string constants have been changed to
|
||||||
|
resolve to a different name. The standard builder uses this name and I wanted
|
||||||
Prepended "Managed" to the externalized string identifiers to avoid future overlap
|
to minimize the possibility of problems later.
|
||||||
with the standard build system. Had to update the makefile generator to use the
|
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
||||||
new identifiers.
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties
|
Prepended "Managed" to the externalized string identifiers to avoid future overlap
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
with the standard build system. Had to update the makefile generator to use the
|
||||||
|
new identifiers.
|
||||||
Changed the signature of the 'getMakeArguments' to return a string instead of an
|
* src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties
|
||||||
array so the builder can invoke make with the user-specified args. I also changed
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
||||||
the logic of the getMakeCommand method in the implementor so that it only returns
|
|
||||||
a string containing the command itself.
|
Changed the signature of the 'getMakeArguments' to return a string instead of an
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java
|
array so the builder can invoke make with the user-specified args. I also changed
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
the logic of the getMakeCommand method in the implementor so that it only returns
|
||||||
|
a string containing the command itself.
|
||||||
Explicitly trim all arrays to size before converting them to String[] for Options
|
* src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java
|
||||||
and Tools.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
||||||
*src/org/eclipse/cdt/managedbuilder/internal/core/Option.java
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
|
Explicitly trim all arrays to size before converting them to String[] for Options
|
||||||
|
and Tools.
|
||||||
Fixed a missing bit of logic in the Configuration when a user-object option is
|
*src/org/eclipse/cdt/managedbuilder/internal/core/Option.java
|
||||||
deleted. Now the build model really does get rid of the the value.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
|
|
||||||
|
Fixed a missing bit of logic in the Configuration when a user-object option is
|
||||||
2003-09-25 Sean Evoy
|
deleted. Now the build model really does get rid of the the value.
|
||||||
This patch contains a lot of changes needed to implement fixes for 42648 and
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
|
||||||
43122.
|
|
||||||
|
2003-09-25 Sean Evoy
|
||||||
For 42648, the schema for the the target had to be modified to include a
|
This patch contains a lot of changes needed to implement fixes for 42648 and
|
||||||
comma-separated list of valid host platforms.
|
43122.
|
||||||
* schema/ManagedBuildTools.exsd
|
|
||||||
|
For 42648, the schema for the the target had to be modified to include a
|
||||||
The target had to be updated to properly read in and understand this info, and
|
comma-separated list of valid host platforms.
|
||||||
the interface had to be updated to return a list to the clients in the UI. The
|
* schema/ManagedBuildTools.exsd
|
||||||
target was also changed slightly. It now uses a safer accessor method to get at
|
|
||||||
the list of tools it maintains. I have also stopped persisting non-variant info
|
The target had to be updated to properly read in and understand this info, and
|
||||||
to the project file on serialize. There are elements of the target that are not
|
the interface had to be updated to return a list to the clients in the UI. The
|
||||||
subject to change by the user (yet) so they should not be saved.
|
target was also changed slightly. It now uses a safer accessor method to get at
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ITarget.java
|
the list of tools it maintains. I have also stopped persisting non-variant info
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
to the project file on serialize. There are elements of the target that are not
|
||||||
|
subject to change by the user (yet) so they should not be saved.
|
||||||
For 43122, I started by simply adding a tool reference to the configurations.
|
* src/org/eclipse/cdt/managedbuilder/core/ITarget.java
|
||||||
The tool reference had option references for debug and optimization levels. It
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
||||||
should have worked, but the model was not handling the inheritance properly. The
|
|
||||||
JUnit tests were not finding it because of how they were configured. It was most
|
For 43122, I started by simply adding a tool reference to the configurations.
|
||||||
evident in the UI. So, the way configurations and tool reference search for
|
The tool reference had option references for debug and optimization levels. It
|
||||||
overridden option references had to be modified. While I was in there, I cleaned
|
should have worked, but the model was not handling the inheritance properly. The
|
||||||
up some of the accessor and iteration code in ToolReference and OptionReference.
|
JUnit tests were not finding it because of how they were configured. It was most
|
||||||
|
evident in the UI. So, the way configurations and tool reference search for
|
||||||
For the configuration, the only significant change was a new search method to
|
overridden option references had to be modified. While I was in there, I cleaned
|
||||||
find all option references for a given tool, no matter where they are stored.
|
up some of the accessor and iteration code in ToolReference and OptionReference.
|
||||||
The method had to consider what was overridden in a child config, what was added by
|
|
||||||
a child config, and what the parent (or parents) define.
|
For the configuration, the only significant change was a new search method to
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
|
find all option references for a given tool, no matter where they are stored.
|
||||||
|
The method had to consider what was overridden in a child config, what was added by
|
||||||
Option reference now pays attention to overidden values in the plugin file. Until
|
a child config, and what the parent (or parents) define.
|
||||||
now, it only handled the overrides in the project file.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
|
|
||||||
|
Option reference now pays attention to overidden values in the plugin file. Until
|
||||||
The ToolReference now distinguishes between local option references which it
|
now, it only handled the overrides in the project file.
|
||||||
manages directly, and option references held by tool references in the parent(s)
|
* src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
|
||||||
of its owner. It only serializes its own references, but when asked for options
|
|
||||||
relating to the tool it references, it replies with all option references in its
|
The ToolReference now distinguishes between local option references which it
|
||||||
hierarchy.
|
manages directly, and option references held by tool references in the parent(s)
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
|
of its owner. It only serializes its own references, but when asked for options
|
||||||
|
relating to the tool it references, it replies with all option references in its
|
||||||
|
hierarchy.
|
||||||
2003-09-25 Bogdan Gheorghe
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
|
||||||
Modified ResourceDeltaVisitor.visit() to use the new mechanism to get the
|
|
||||||
projects that dependend a file.
|
|
||||||
|
2003-09-25 Bogdan Gheorghe
|
||||||
Modified addSourceDependencies() to use the new mechanism to perform a DependencyQueryJob
|
Modified ResourceDeltaVisitor.visit() to use the new mechanism to get the
|
||||||
|
projects that dependend a file.
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakeFileGenerator.java
|
|
||||||
|
Modified addSourceDependencies() to use the new mechanism to perform a DependencyQueryJob
|
||||||
2003-09-24 Sean Evoy
|
|
||||||
Changed the implementor of IScannerInfo to answer only absolute paths when asked for
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakeFileGenerator.java
|
||||||
includes paths. Users will specify the includes paths in the managed build UI in such a way
|
|
||||||
that the compiler will not complain. Either they will use absolute paths, or they will specify
|
2003-09-24 Sean Evoy
|
||||||
them relative to the build directory. In the second case, it is easier for the managed builder
|
Changed the implementor of IScannerInfo to answer only absolute paths when asked for
|
||||||
to convert the paths relative to this directory into absolute paths before replying tha it is for
|
includes paths. Users will specify the includes paths in the managed build UI in such a way
|
||||||
the client to figure this out.
|
that the compiler will not complain. Either they will use absolute paths, or they will specify
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
them relative to the build directory. In the second case, it is easier for the managed builder
|
||||||
|
to convert the paths relative to this directory into absolute paths before replying tha it is for
|
||||||
2003-09-23 Sean Evoy
|
the client to figure this out.
|
||||||
All the work in this patch is for critical bug 43292. In order to manage
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
||||||
configurations, there had to be a method through ITarget to remove
|
|
||||||
configurations. Also, to support the naming of newly created configurations,
|
2003-09-23 Sean Evoy
|
||||||
I added a name method to the IConfiguration interface. Finally, the ITarget
|
All the work in this patch is for critical bug 43292. In order to manage
|
||||||
needed to support setting (and resetting) the make command to use when building.
|
configurations, there had to be a method through ITarget to remove
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/IConfiguration.java
|
configurations. Also, to support the naming of newly created configurations,
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ITarget.java
|
I added a name method to the IConfiguration interface. Finally, the ITarget
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
needed to support setting (and resetting) the make command to use when building.
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/core/IConfiguration.java
|
||||||
2003-09-19 Sean Evoy
|
* src/org/eclipse/cdt/managedbuilder/core/ITarget.java
|
||||||
Added a new field to the target specification in the build model to
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
||||||
hard-code the binary parser for project creation. There is a new getter
|
|
||||||
method in the interface and the implementor contains additional code to
|
2003-09-19 Sean Evoy
|
||||||
extract the information from a project file or plugin manifest. The
|
Added a new field to the target specification in the build model to
|
||||||
interface also contains new strings to make changing the specification
|
hard-code the binary parser for project creation. There is a new getter
|
||||||
easier in the future.
|
method in the interface and the implementor contains additional code to
|
||||||
* schema/ManagedBuildTools.exsd
|
extract the information from a project file or plugin manifest. The
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ITarget.java
|
interface also contains new strings to make changing the specification
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
easier in the future.
|
||||||
|
* schema/ManagedBuildTools.exsd
|
||||||
Fix for bug 41720: libraries are now found for Solaris and Linux
|
* src/org/eclipse/cdt/managedbuilder/core/ITarget.java
|
||||||
executables. The problem was the executable had no extension and
|
* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
|
||||||
the client of the build model passed null instead of the empty string.
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
Fix for bug 41720: libraries are now found for Solaris and Linux
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
executables. The problem was the executable had no extension and
|
||||||
|
the client of the build model passed null instead of the empty string.
|
||||||
2003-09-16 Sean Evoy
|
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
||||||
Patch contains a fix for bug 43017. Renamed the "addDeps" method to a
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
||||||
more descriptive "addSourceDependencies". Added a flag when the
|
|
||||||
inter-project dependencies are calculated so that clean and all are
|
2003-09-16 Sean Evoy
|
||||||
properly passed to the make invocation. Finally, I replaced the hard-coded
|
Patch contains a fix for bug 43017. Renamed the "addDeps" method to a
|
||||||
'make' with $(MAKE)
|
more descriptive "addSourceDependencies". Added a flag when the
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
inter-project dependencies are calculated so that clean and all are
|
||||||
|
properly passed to the make invocation. Finally, I replaced the hard-coded
|
||||||
It also contains some more work on 41826, specifically on the logic to
|
'make' with $(MAKE)
|
||||||
implement a rebuild when the build settings change. The builder checks for
|
* src/org/eclipse/cdt/managedbuilder/internal/core/MakefileGenerator.java
|
||||||
a build model change whenever a build is requested and responds appropriately.
|
|
||||||
The make targets (i.e. 'clean' and 'all') are also calculated differently now.
|
It also contains some more work on 41826, specifically on the logic to
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
implement a rebuild when the build settings change. The builder checks for
|
||||||
|
a build model change whenever a build is requested and responds appropriately.
|
||||||
The build model was modified to set a dirty flag when an option changes. I also
|
The make targets (i.e. 'clean' and 'all') are also calculated differently now.
|
||||||
made a change to avoid an NPE when the build info was loaded.
|
* src/org/eclipse/cdt/managedbuilder/internal/core/GeneratedMakefileBuilder.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java
|
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
The build model was modified to set a dirty flag when an option changes. I also
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
|
made a change to avoid an NPE when the build info was loaded.
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/core/IManagedBuildInfo.java
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/internal/core/ManagedBuildInfo.java
|
||||||
2003-09-15 Sean Evoy
|
* src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java
|
||||||
First submission of code to new project. Moved the managed builder
|
|
||||||
source code out of the cdt.core project. This includes the code to
|
|
||||||
implement the build model, along with the shema and extension point
|
2003-09-15 Sean Evoy
|
||||||
declaration. Moved the builder, scnanaer info provider and managed
|
First submission of code to new project. Moved the managed builder
|
||||||
nature definitions into the package as well.
|
source code out of the cdt.core project. This includes the code to
|
||||||
|
implement the build model, along with the shema and extension point
|
||||||
There are 2 new classes to handle the externalized strings:
|
declaration. Moved the builder, scnanaer info provider and managed
|
||||||
* src/org/eclipse/cdt/managedbuilder/core/ManagedBuilderCorePlugin.java
|
nature definitions into the package as well.
|
||||||
|
|
||||||
|
There are 2 new classes to handle the externalized strings:
|
||||||
|
* src/org/eclipse/cdt/managedbuilder/core/ManagedBuilderCorePlugin.java
|
||||||
* src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties
|
* src/org/eclipse/cdt/managedbuilder/internal/core/PluginResources.properties
|
|
@ -161,7 +161,7 @@ public class MakefileGenerator {
|
||||||
pathCollector,
|
pathCollector,
|
||||||
indexManager),
|
indexManager),
|
||||||
ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
|
ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
|
||||||
null);
|
null, null);
|
||||||
|
|
||||||
// We will get back an array of resource names relative to the workspace
|
// We will get back an array of resource names relative to the workspace
|
||||||
String[] deps = pathCollector.getPaths();
|
String[] deps = pathCollector.getPaths();
|
||||||
|
@ -341,7 +341,7 @@ public class MakefileGenerator {
|
||||||
// ASk the dep generator to find all the deps for this resource
|
// ASk the dep generator to find all the deps for this resource
|
||||||
ArrayList dependencies = new ArrayList();
|
ArrayList dependencies = new ArrayList();
|
||||||
try {
|
try {
|
||||||
indexManager.performConcurrentJob(new DependencyQueryJob(project, (IFile)resource, indexManager, dependencies), ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, null);
|
indexManager.performConcurrentJob(new DependencyQueryJob(project, (IFile)resource, indexManager, dependencies), ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, null, null);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,6 @@ import java.util.Arrays;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import junit.extensions.TestDecorator;
|
|
||||||
import junit.framework.Test;
|
import junit.framework.Test;
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
import junit.framework.TestSuite;
|
import junit.framework.TestSuite;
|
||||||
|
@ -143,7 +142,7 @@ import org.eclipse.core.runtime.Platform;
|
||||||
String[] depTest2Model = {File.separator + "DepTestProject" + File.separator + "d.h", File.separator + "DepTestProject" + File.separator + "DepTest2.h"};
|
String[] depTest2Model = {File.separator + "DepTestProject" + File.separator + "d.h", File.separator + "DepTestProject" + File.separator + "DepTest2.h"};
|
||||||
|
|
||||||
ArrayList includes = new ArrayList();
|
ArrayList includes = new ArrayList();
|
||||||
indexManager.performConcurrentJob(new DependencyQueryJob(testProject,depTest,indexManager,includes),ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,null);
|
indexManager.performConcurrentJob(new DependencyQueryJob(testProject,depTest,indexManager,includes),ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,null,null);
|
||||||
|
|
||||||
String[] depTestModelLocal = convertToLocalPath(depTestModel);
|
String[] depTestModelLocal = convertToLocalPath(depTestModel);
|
||||||
String[] depTestIncludes = new String[includes.size()];
|
String[] depTestIncludes = new String[includes.size()];
|
||||||
|
@ -166,7 +165,7 @@ import org.eclipse.core.runtime.Platform;
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayList includes2 = new ArrayList();
|
ArrayList includes2 = new ArrayList();
|
||||||
indexManager.performConcurrentJob(new DependencyQueryJob(testProject,depTest2,indexManager,includes2),ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,null);
|
indexManager.performConcurrentJob(new DependencyQueryJob(testProject,depTest2,indexManager,includes2),ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,null,null);
|
||||||
|
|
||||||
String[] depTest2ModelLocal = convertToLocalPath(depTest2Model);
|
String[] depTest2ModelLocal = convertToLocalPath(depTest2Model);
|
||||||
String[] depTest2Includes = new String[includes2.size()];
|
String[] depTest2Includes = new String[includes2.size()];
|
||||||
|
@ -345,7 +344,7 @@ import org.eclipse.core.runtime.Platform;
|
||||||
String[] preDepTestModel = {File.separator + "DepTestProject" + File.separator + "DepTest.h", File.separator + "DepTestProject" + File.separator + "Inc1.h", File.separator + "DepTestProject" + File.separator + "a.h", File.separator + "DepTestProject" + File.separator + "c.h", File.separator + "DepTestProject" + File.separator + "d.h"};
|
String[] preDepTestModel = {File.separator + "DepTestProject" + File.separator + "DepTest.h", File.separator + "DepTestProject" + File.separator + "Inc1.h", File.separator + "DepTestProject" + File.separator + "a.h", File.separator + "DepTestProject" + File.separator + "c.h", File.separator + "DepTestProject" + File.separator + "d.h"};
|
||||||
|
|
||||||
ArrayList includes = new ArrayList();
|
ArrayList includes = new ArrayList();
|
||||||
indexManager.performConcurrentJob(new DependencyQueryJob(testProject,depTestC,indexManager,includes),ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,null);
|
indexManager.performConcurrentJob(new DependencyQueryJob(testProject,depTestC,indexManager,includes),ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,null, null);
|
||||||
|
|
||||||
String[] preDepTestModelLocal = convertToLocalPath(preDepTestModel);
|
String[] preDepTestModelLocal = convertToLocalPath(preDepTestModel);
|
||||||
String[] preDepTestIncludes = new String[includes.size()];
|
String[] preDepTestIncludes = new String[includes.size()];
|
||||||
|
@ -374,7 +373,7 @@ import org.eclipse.core.runtime.Platform;
|
||||||
|
|
||||||
testProject.refreshLocal(IResource.DEPTH_INFINITE,null);
|
testProject.refreshLocal(IResource.DEPTH_INFINITE,null);
|
||||||
|
|
||||||
indexManager.performConcurrentJob(new DependencyQueryJob(testProject,depTestC,indexManager,includes2),ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,null);
|
indexManager.performConcurrentJob(new DependencyQueryJob(testProject,depTestC,indexManager,includes2),ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,null, null);
|
||||||
|
|
||||||
|
|
||||||
String[] postDepTestModelLocal = convertToLocalPath(postDepTestModel);
|
String[] postDepTestModelLocal = convertToLocalPath(postDepTestModel);
|
||||||
|
@ -412,7 +411,7 @@ import org.eclipse.core.runtime.Platform;
|
||||||
String[] preDepTestModel = {File.separator + "DepTestProject" + File.separator + "DepTest3.h", File.separator + "DepTestProject" + File.separator + "a.h", File.separator + "DepTestProject" + File.separator + "c.h"};
|
String[] preDepTestModel = {File.separator + "DepTestProject" + File.separator + "DepTest3.h", File.separator + "DepTestProject" + File.separator + "a.h", File.separator + "DepTestProject" + File.separator + "c.h"};
|
||||||
|
|
||||||
ArrayList includes = new ArrayList();
|
ArrayList includes = new ArrayList();
|
||||||
indexManager.performConcurrentJob(new DependencyQueryJob(testProject,depTest3C,indexManager,includes),ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,null);
|
indexManager.performConcurrentJob(new DependencyQueryJob(testProject,depTest3C,indexManager,includes),ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,null, null);
|
||||||
|
|
||||||
String[] preDepTestModelLocal = convertToLocalPath(preDepTestModel);
|
String[] preDepTestModelLocal = convertToLocalPath(preDepTestModel);
|
||||||
String[] preDepTestIncludes = new String[includes.size()];
|
String[] preDepTestIncludes = new String[includes.size()];
|
||||||
|
@ -441,7 +440,7 @@ import org.eclipse.core.runtime.Platform;
|
||||||
|
|
||||||
testProject.refreshLocal(IResource.DEPTH_INFINITE,null);
|
testProject.refreshLocal(IResource.DEPTH_INFINITE,null);
|
||||||
|
|
||||||
indexManager.performConcurrentJob(new DependencyQueryJob(testProject,depTest3C,indexManager,includes2),ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,null);
|
indexManager.performConcurrentJob(new DependencyQueryJob(testProject,depTest3C,indexManager,includes2),ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,null, null);
|
||||||
|
|
||||||
|
|
||||||
String[] postDepTestModelLocal = convertToLocalPath(postDepTestModel);
|
String[] postDepTestModelLocal = convertToLocalPath(postDepTestModel);
|
||||||
|
@ -583,7 +582,7 @@ import org.eclipse.core.runtime.Platform;
|
||||||
indexManager
|
indexManager
|
||||||
),
|
),
|
||||||
ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
|
ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
|
||||||
null );
|
null, null );
|
||||||
}
|
}
|
||||||
|
|
||||||
private void editCode(IFile tempFile, String beforeString, String afterString) throws IOException, CoreException, InterruptedException{
|
private void editCode(IFile tempFile, String beforeString, String afterString) throws IOException, CoreException, InterruptedException{
|
||||||
|
|
|
@ -123,6 +123,8 @@ public class WorkingCopyTests extends TestCase {
|
||||||
|
|
||||||
// DestroyWorkingCopy
|
// DestroyWorkingCopy
|
||||||
wc.destroy();
|
wc.destroy();
|
||||||
assertFalse(wc.exists());
|
assertFalse(wc.exists());
|
||||||
|
|
||||||
|
Thread.sleep(1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -24,7 +24,6 @@ import org.eclipse.cdt.core.search.ICSearchPattern;
|
||||||
import org.eclipse.cdt.core.search.ICSearchResultCollector;
|
import org.eclipse.cdt.core.search.ICSearchResultCollector;
|
||||||
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.search.indexing.IndexManager;
|
|
||||||
import org.eclipse.cdt.internal.ui.search.CSearchResultCollector;
|
import org.eclipse.cdt.internal.ui.search.CSearchResultCollector;
|
||||||
import org.eclipse.cdt.testplugin.FileManager;
|
import org.eclipse.cdt.testplugin.FileManager;
|
||||||
import org.eclipse.core.internal.resources.ResourceException;
|
import org.eclipse.core.internal.resources.ResourceException;
|
||||||
|
|
|
@ -13,19 +13,23 @@
|
||||||
*/
|
*/
|
||||||
package org.eclipse.cdt.core.search.tests;
|
package org.eclipse.cdt.core.search.tests;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeSet;
|
import java.util.TreeSet;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.search.BasicSearchMatch;
|
import org.eclipse.cdt.core.search.BasicSearchMatch;
|
||||||
import org.eclipse.cdt.core.search.ICSearchPattern;
|
import org.eclipse.cdt.core.search.ICSearchPattern;
|
||||||
import org.eclipse.cdt.core.search.IMatch;
|
import org.eclipse.cdt.core.search.IMatch;
|
||||||
import org.eclipse.cdt.core.search.SearchEngine;
|
import org.eclipse.cdt.core.search.SearchEngine;
|
||||||
import org.eclipse.cdt.internal.core.CharOperation;
|
import org.eclipse.cdt.internal.core.CharOperation;
|
||||||
|
import org.eclipse.cdt.internal.core.search.AcceptMatchOperation;
|
||||||
import org.eclipse.cdt.internal.core.search.matching.FieldDeclarationPattern;
|
import org.eclipse.cdt.internal.core.search.matching.FieldDeclarationPattern;
|
||||||
import org.eclipse.cdt.internal.core.search.matching.MatchLocator;
|
import org.eclipse.cdt.internal.core.search.matching.MatchLocator;
|
||||||
import org.eclipse.cdt.internal.core.search.matching.NamespaceDeclarationPattern;
|
import org.eclipse.cdt.internal.core.search.matching.NamespaceDeclarationPattern;
|
||||||
import org.eclipse.cdt.internal.core.search.matching.OrPattern;
|
import org.eclipse.cdt.internal.core.search.matching.OrPattern;
|
||||||
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.Path;
|
import org.eclipse.core.runtime.Path;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -322,9 +326,20 @@ public class OtherPatternTests extends BaseSearchTest {
|
||||||
resultCollector.setProgressMonitor( monitor );
|
resultCollector.setProgressMonitor( monitor );
|
||||||
|
|
||||||
resultCollector.aboutToStart();
|
resultCollector.aboutToStart();
|
||||||
MatchLocator matchLocator = new MatchLocator( pattern, resultCollector, scope, monitor );
|
|
||||||
matchLocator.locateMatches( new String [] { path }, workspace, null );
|
ArrayList matchesList = new ArrayList();
|
||||||
resultCollector.done();
|
MatchLocator matchLocator = new MatchLocator( pattern, resultCollector, scope, monitor );
|
||||||
|
matchLocator.locateMatches( new String [] { path }, workspace, null, matchesList);
|
||||||
|
|
||||||
|
AcceptMatchOperation acceptMatchOp = new AcceptMatchOperation(resultCollector, matchesList);
|
||||||
|
try {
|
||||||
|
CCorePlugin.getWorkspace().run(acceptMatchOp,null);
|
||||||
|
} catch (CoreException e) {
|
||||||
|
// TODO Auto-generated catch block
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
//
|
||||||
|
//resultCollector.done();
|
||||||
|
|
||||||
Set matches = resultCollector.getSearchResults();
|
Set matches = resultCollector.getSearchResults();
|
||||||
assertEquals( matches.size(), 4 );
|
assertEquals( matches.size(), 4 );
|
||||||
|
|
|
@ -1,57 +1,60 @@
|
||||||
2003-09-25 Bogdan Gheorghe
|
2003-10-23 Bogdan Gheorghe
|
||||||
- As a result of folding the dependency service into the indexer
|
- Added UpdateDependency job
|
||||||
have removed the following files:
|
|
||||||
|
2003-09-25 Bogdan Gheorghe
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/AddFileToDependencyTree.java
|
- As a result of folding the dependency service into the indexer
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/DependencyManager.java
|
have removed the following files:
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/DependencyRequest.java
|
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/DependencyRequestor.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/AddFileToDependencyTree.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/DependencySelector.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/DependencyManager.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/DependencyTree.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/DependencyRequest.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/EntireProjectDependencyTree.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/DependencyRequestor.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/IDependencyTree.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/DependencySelector.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/IPreprocessorOutput.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/DependencyTree.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/ISourceDependency.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/EntireProjectDependencyTree.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/PreprocessorOutput.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/IDependencyTree.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/RemoveFromDependencyTree.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/IPreprocessorOutput.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/impl/IncludeEntry.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/ISourceDependency.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/impl/IncludeEntryHashedArray.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/PreprocessorOutput.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/impl/InMemoryTree.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/RemoveFromDependencyTree.java
|
||||||
|
* src/org/eclipse/cdt/internal/core/sourcedependency/impl/IncludeEntry.java
|
||||||
|
* src/org/eclipse/cdt/internal/core/sourcedependency/impl/IncludeEntryHashedArray.java
|
||||||
|
* src/org/eclipse/cdt/internal/core/sourcedependency/impl/InMemoryTree.java
|
||||||
2003-09-22 Bogdan Gheorghe
|
|
||||||
- Took out enable section for DependencyManager
|
|
||||||
|
|
||||||
2003-09-11 Bogdan Gheorghe
|
2003-09-22 Bogdan Gheorghe
|
||||||
- Added null guard to DependencyManager.getDependencyTree(),
|
- Took out enable section for DependencyManager
|
||||||
DependencyTree.getFileDependencies()
|
|
||||||
|
2003-09-11 Bogdan Gheorghe
|
||||||
2003-09-08 Andrew Niefer
|
- Added null guard to DependencyManager.getDependencyTree(),
|
||||||
- Modified calls to ParserFactory to specify which language to use
|
DependencyTree.getFileDependencies()
|
||||||
- Modified IDependencyTree.add to take ParserLanguage as a parameter so that it can
|
|
||||||
be passed on when creating the preprocessor
|
2003-09-08 Andrew Niefer
|
||||||
|
- Modified calls to ParserFactory to specify which language to use
|
||||||
2003-07-23 Bogdan Gheorghe
|
- Modified IDependencyTree.add to take ParserLanguage as a parameter so that it can
|
||||||
|
be passed on when creating the preprocessor
|
||||||
Added initial dependency implementation
|
|
||||||
|
2003-07-23 Bogdan Gheorghe
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/AddFileToDependencyTree.java
|
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/DependencyManager.java
|
Added initial dependency implementation
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/DenpendencyQueryJob.java
|
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/DependencyRequest.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/AddFileToDependencyTree.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/DependencyRequestor.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/DependencyManager.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/DependencyTree.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/DenpendencyQueryJob.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/EntireProjectDependencyTree.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/DependencyRequest.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/IDependencyTree.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/DependencyRequestor.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/IPreprocessorOutput.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/DependencyTree.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/ISourceDependency.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/EntireProjectDependencyTree.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/PreprocessorOutput.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/IDependencyTree.java
|
||||||
|
* src/org/eclipse/cdt/internal/core/sourcedependency/IPreprocessorOutput.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/impl/IncludeEntry.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/ISourceDependency.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/impl/IncludeEntryHashedArray.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/PreprocessorOutput.java
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/impl/InMemoryTree.java
|
|
||||||
* src/org/eclipse/cdt/internal/core/sourcedependency/impl/Node.java
|
* src/org/eclipse/cdt/internal/core/sourcedependency/impl/IncludeEntry.java
|
||||||
|
* src/org/eclipse/cdt/internal/core/sourcedependency/impl/IncludeEntryHashedArray.java
|
||||||
-
|
* src/org/eclipse/cdt/internal/core/sourcedependency/impl/InMemoryTree.java
|
||||||
|
* src/org/eclipse/cdt/internal/core/sourcedependency/impl/Node.java
|
||||||
|
|
||||||
|
-
|
||||||
|
|
|
@ -0,0 +1,101 @@
|
||||||
|
/*
|
||||||
|
* Created on Oct 13, 2003
|
||||||
|
*
|
||||||
|
* To change the template for this generated file go to
|
||||||
|
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||||
|
*/
|
||||||
|
package org.eclipse.cdt.internal.core.sourcedependency;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.CCorePlugin;
|
||||||
|
import org.eclipse.cdt.core.search.ICSearchConstants;
|
||||||
|
import org.eclipse.cdt.core.search.ICSearchScope;
|
||||||
|
import org.eclipse.cdt.core.search.SearchEngine;
|
||||||
|
import org.eclipse.cdt.internal.core.search.PathCollector;
|
||||||
|
import org.eclipse.cdt.internal.core.search.PatternSearchJob;
|
||||||
|
import org.eclipse.cdt.internal.core.search.indexing.IndexManager;
|
||||||
|
import org.eclipse.cdt.internal.core.search.matching.CSearchPattern;
|
||||||
|
import org.eclipse.cdt.internal.core.search.processing.IJob;
|
||||||
|
import org.eclipse.core.resources.IFile;
|
||||||
|
import org.eclipse.core.resources.IResource;
|
||||||
|
import org.eclipse.core.resources.IWorkspaceRoot;
|
||||||
|
import org.eclipse.core.runtime.IPath;
|
||||||
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
import org.eclipse.core.runtime.Path;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author bgheorgh
|
||||||
|
*
|
||||||
|
* To change the template for this generated type comment go to
|
||||||
|
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||||
|
*/
|
||||||
|
public class UpdateDependency implements IJob {
|
||||||
|
PathCollector pathCollector;
|
||||||
|
IResource resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param resource
|
||||||
|
*/
|
||||||
|
public UpdateDependency(IResource resource) {
|
||||||
|
this.resource = resource;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.internal.core.search.processing.IJob#belongsTo(java.lang.String)
|
||||||
|
*/
|
||||||
|
public boolean belongsTo(String jobFamily) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.internal.core.search.processing.IJob#cancel()
|
||||||
|
*/
|
||||||
|
public void cancel() {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.internal.core.search.processing.IJob#execute(org.eclipse.core.runtime.IProgressMonitor)
|
||||||
|
*/
|
||||||
|
public boolean execute(IProgressMonitor progress) {
|
||||||
|
PathCollector pathCollector = new PathCollector();
|
||||||
|
//SubProgressMonitor subMonitor = (progressMonitor == null ) ? null : new SubProgressMonitor( progressMonitor, 5 );
|
||||||
|
ICSearchScope scope = SearchEngine.createWorkspaceScope();
|
||||||
|
CSearchPattern pattern = CSearchPattern.createPattern(resource.getLocation().toOSString(),ICSearchConstants.INCLUDE, ICSearchConstants.REFERENCES,ICSearchConstants.EXACT_MATCH,true);
|
||||||
|
IndexManager indexManager = CCorePlugin.getDefault().getCoreModel().getIndexManager();
|
||||||
|
indexManager.performConcurrentJob(
|
||||||
|
new PatternSearchJob(
|
||||||
|
(CSearchPattern) pattern,
|
||||||
|
scope,
|
||||||
|
pathCollector,
|
||||||
|
indexManager
|
||||||
|
),
|
||||||
|
ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
|
||||||
|
null,
|
||||||
|
this );
|
||||||
|
|
||||||
|
String[] iPath = pathCollector.getPaths();
|
||||||
|
for (int i=0;i<iPath.length; i++){
|
||||||
|
IPath pathToReindex = new Path(iPath[i]);
|
||||||
|
IWorkspaceRoot workRoot = resource.getWorkspace().getRoot();
|
||||||
|
IFile fileToReindex = workRoot.getFile(pathToReindex);
|
||||||
|
|
||||||
|
if (fileToReindex!=null && fileToReindex.exists() ) {
|
||||||
|
// if (VERBOSE)
|
||||||
|
// System.out.println("Going to reindex " + fileToReindex.getName());
|
||||||
|
indexManager.addSource(fileToReindex,fileToReindex.getProject().getProject().getFullPath());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.cdt.internal.core.search.processing.IJob#isReadyToRun()
|
||||||
|
*/
|
||||||
|
public boolean isReadyToRun() {
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -1,230 +1,235 @@
|
||||||
2003-10-01 Bogdan Gheorghe
|
2003-10-22 Bogdan Gheorghe
|
||||||
- Modified BlockIndexOutput.addInclude to properly flush an
|
|
||||||
include block once it's full.
|
Added updateDependencies() to the IndexManager to request
|
||||||
- Flushing the CDT log after every merge
|
a new UpdateDependency job.
|
||||||
- Logging I/O Exceptions in AddFileToIndex
|
|
||||||
- Changed valid source file extensions in SourceIndexer to
|
2003-10-01 Bogdan Gheorghe
|
||||||
use CModelManager file extensions
|
- Modified BlockIndexOutput.addInclude to properly flush an
|
||||||
|
include block once it's full.
|
||||||
2003-09-30 Bogdan Gheorghe
|
- Flushing the CDT log after every merge
|
||||||
Changed logging for SourceIndexer to log file in cdt.core
|
- Logging I/O Exceptions in AddFileToIndex
|
||||||
|
- Changed valid source file extensions in SourceIndexer to
|
||||||
2003-09-25 Bogdan Gheorghe
|
use CModelManager file extensions
|
||||||
Integrated the dependency service into the indexer. Changes
|
|
||||||
as follows:
|
2003-09-30 Bogdan Gheorghe
|
||||||
|
Changed logging for SourceIndexer to log file in cdt.core
|
||||||
org.eclipse.cdt.internal.core.index.impl:
|
|
||||||
* IIndex - added getFileDependencies methods
|
2003-09-25 Bogdan Gheorghe
|
||||||
* IIndexerOutput - modified to allow dep inputs into the index
|
Integrated the dependency service into the indexer. Changes
|
||||||
* BlocksIndexInput - modified to allow the reading of the new index (which includes dep entries)
|
as follows:
|
||||||
* BlocksIndexOutput - added facilities to write includes to the index
|
|
||||||
* GammaCompressedIndexBlock - modified with addIncludeEntry() and nextEntry()
|
org.eclipse.cdt.internal.core.index.impl:
|
||||||
* IncludeEntry - new file
|
* IIndex - added getFileDependencies methods
|
||||||
* IncludeEntryHashedArray - new file
|
* IIndexerOutput - modified to allow dep inputs into the index
|
||||||
* Index - Added getFileDepenendencies to query includeEntries from the index
|
* BlocksIndexInput - modified to allow the reading of the new index (which includes dep entries)
|
||||||
* IndexBlock - modified to reflect changes in GammaCompressedIndexBlock
|
* BlocksIndexOutput - added facilities to write includes to the index
|
||||||
* IndexerOutput - added new methods from IIndexerOutput
|
* GammaCompressedIndexBlock - modified with addIncludeEntry() and nextEntry()
|
||||||
* IndexInput - modified to allow reading of includes from index files
|
* IncludeEntry - new file
|
||||||
* IndexSummary - modified to save/read new format which contains include info
|
* IncludeEntryHashedArray - new file
|
||||||
* InMemoryIndex - modified InMemoryIndex to keep track of includes
|
* Index - Added getFileDepenendencies to query includeEntries from the index
|
||||||
* MergeFactory - modified MergeFactory to accomodate new index file format
|
* IndexBlock - modified to reflect changes in GammaCompressedIndexBlock
|
||||||
* SimpleIndexInput - modified to use the new functions for includes in InMemoryIndex
|
* IndexerOutput - added new methods from IIndexerOutput
|
||||||
* Util - Added a quickSort for includeEntry[]
|
* IndexInput - modified to allow reading of includes from index files
|
||||||
|
* IndexSummary - modified to save/read new format which contains include info
|
||||||
org.eclipse.cdt.internal.core.search.indexing:
|
* InMemoryIndex - modified InMemoryIndex to keep track of includes
|
||||||
* AbstractIndexer - modified to getResourceFile being indexed, added bestIncludePrefix
|
* MergeFactory - modified MergeFactory to accomodate new index file format
|
||||||
to find include table entries, addInclude() which accepts IASTInclusion node and adds it
|
* SimpleIndexInput - modified to use the new functions for includes in InMemoryIndex
|
||||||
to the index
|
* Util - Added a quickSort for includeEntry[]
|
||||||
* IIndexConstants - added includeRef constant
|
|
||||||
* IndexManager - got rid of all dependency table references
|
org.eclipse.cdt.internal.core.search.indexing:
|
||||||
* SourceIndexer - modified to return resource being indexed
|
* AbstractIndexer - modified to getResourceFile being indexed, added bestIncludePrefix
|
||||||
* SourceIndexerRequestor - Added inclusion handling code; stack for includes
|
to find include table entries, addInclude() which accepts IASTInclusion node and adds it
|
||||||
|
to the index
|
||||||
|
* IIndexConstants - added includeRef constant
|
||||||
2003-09-22 Bogdan Gheorghe
|
* IndexManager - got rid of all dependency table references
|
||||||
|
* SourceIndexer - modified to return resource being indexed
|
||||||
Took out the old CTags Indexer. Modified IndexAllProject to get
|
* SourceIndexerRequestor - Added inclusion handling code; stack for includes
|
||||||
the project path straight from the resource (bypassing the CModelManager).
|
|
||||||
Commented out the enable section in IndexManager.
|
|
||||||
|
2003-09-22 Bogdan Gheorghe
|
||||||
Modified
|
|
||||||
* org.eclipse.cdt.internal.core.search.indexing.IndexAllProject
|
Took out the old CTags Indexer. Modified IndexAllProject to get
|
||||||
* org.eclipse.cdt.internal.core.search.indexing.IndexManager
|
the project path straight from the resource (bypassing the CModelManager).
|
||||||
|
Commented out the enable section in IndexManager.
|
||||||
Deleted
|
|
||||||
* org.eclipse.cdt.core.index.IndexModel
|
Modified
|
||||||
* org.eclipse.cdt.core.index.ITagEntry
|
* org.eclipse.cdt.internal.core.search.indexing.IndexAllProject
|
||||||
* org.eclipse.cdt.core.index.TagFlags
|
* org.eclipse.cdt.internal.core.search.indexing.IndexManager
|
||||||
* org.eclipse.cdt.internal.core.index.CTagsCmd
|
|
||||||
* org.eclipse.cdt.internal.core.index.CTagsEntry
|
Deleted
|
||||||
* org.eclipse.cdt.internal.core.index.CTagsFileReader
|
* org.eclipse.cdt.core.index.IndexModel
|
||||||
* org.eclipse.cdt.internal.core.index.CTagsFileWriter
|
* org.eclipse.cdt.core.index.ITagEntry
|
||||||
* org.eclipse.cdt.internal.core.index.CTagsHeader
|
* org.eclipse.cdt.core.index.TagFlags
|
||||||
* org.eclipse.cdt.internal.core.index.CTagsRunner
|
* org.eclipse.cdt.internal.core.index.CTagsCmd
|
||||||
* org.eclipse.cdt.internal.core.index.IndexManager
|
* org.eclipse.cdt.internal.core.index.CTagsEntry
|
||||||
* org.eclipse.cdt.internal.core.index.RequestList
|
* org.eclipse.cdt.internal.core.index.CTagsFileReader
|
||||||
|
* org.eclipse.cdt.internal.core.index.CTagsFileWriter
|
||||||
2003-09-16 Andrew Niefer
|
* org.eclipse.cdt.internal.core.index.CTagsHeader
|
||||||
- add parameter references to index
|
* org.eclipse.cdt.internal.core.index.CTagsRunner
|
||||||
- modify CharOperation.match to allow escaping wildcards (bug43063)
|
* org.eclipse.cdt.internal.core.index.IndexManager
|
||||||
- modify AbstractIndexer.bestPrefix to handle wildcard escaping in name (bug43063)
|
* org.eclipse.cdt.internal.core.index.RequestList
|
||||||
|
|
||||||
2003-09-13 Andrew Niefer
|
2003-09-16 Andrew Niefer
|
||||||
- add Typedefs to index as Types with suffix T (bug42902)
|
- add parameter references to index
|
||||||
- added addTypedefReference to AbstractIndexer
|
- modify CharOperation.match to allow escaping wildcards (bug43063)
|
||||||
- modified bestTypePrefix in AbstractIndexer
|
- modify AbstractIndexer.bestPrefix to handle wildcard escaping in name (bug43063)
|
||||||
- added TYPEDEF_DECL, TYPEDEF_SUFFIX to IIndexConstants
|
|
||||||
- modified acceptTypedefReference in SourceIndexerRequestor
|
2003-09-13 Andrew Niefer
|
||||||
|
- add Typedefs to index as Types with suffix T (bug42902)
|
||||||
2003-09-09 Andrew Niefer
|
- added addTypedefReference to AbstractIndexer
|
||||||
Enumerator references
|
- modified bestTypePrefix in AbstractIndexer
|
||||||
- Added createEnumeratorFullyQualifiedName in AbstractIndexer
|
- added TYPEDEF_DECL, TYPEDEF_SUFFIX to IIndexConstants
|
||||||
- Added addEnumeratorReference in AbstractIndexer
|
- modified acceptTypedefReference in SourceIndexerRequestor
|
||||||
- implemented acceptEnumeratorReference in SourceIndexerRequestor
|
|
||||||
|
2003-09-09 Andrew Niefer
|
||||||
2003-09-08 Andrew Niefer
|
Enumerator references
|
||||||
- Modified calls to ParserFactory to specify which language to use
|
- Added createEnumeratorFullyQualifiedName in AbstractIndexer
|
||||||
|
- Added addEnumeratorReference in AbstractIndexer
|
||||||
2003-09-05 Andrew Niefer
|
- implemented acceptEnumeratorReference in SourceIndexerRequestor
|
||||||
- Modified how AbstractIndexer creates the fully qualified name for an enumerator (spec 7.2-10)
|
|
||||||
|
2003-09-08 Andrew Niefer
|
||||||
2003-08-26 Bogdan Gheorghe
|
- Modified calls to ParserFactory to specify which language to use
|
||||||
- Removed header file extensions from being indexed (they
|
|
||||||
will be indexed via inclusion)
|
2003-09-05 Andrew Niefer
|
||||||
|
- Modified how AbstractIndexer creates the fully qualified name for an enumerator (spec 7.2-10)
|
||||||
2003-08-20 Bogdan Gheorghe
|
|
||||||
- Added debug tracing in AbstractIndexer
|
2003-08-26 Bogdan Gheorghe
|
||||||
- Added additional file extensions to supported indexed files
|
- Removed header file extensions from being indexed (they
|
||||||
- Changed the parser instantiation to pass in retrieved build
|
will be indexed via inclusion)
|
||||||
info
|
|
||||||
- Added function decl index entry based on enterFunctionBody
|
2003-08-20 Bogdan Gheorghe
|
||||||
- Added method decl index entry based on enterMethodBody
|
- Added debug tracing in AbstractIndexer
|
||||||
- Added forward decl refs
|
- Added additional file extensions to supported indexed files
|
||||||
|
- Changed the parser instantiation to pass in retrieved build
|
||||||
2003-08-14 Bogdan Gheorghe
|
info
|
||||||
- Added forward declarations to index
|
- Added function decl index entry based on enterFunctionBody
|
||||||
|
- Added method decl index entry based on enterMethodBody
|
||||||
2003-08-12 Bogdan Gheorghe
|
- Added forward decl refs
|
||||||
- Changed var prefix in AbstractIndexer to pass in fully
|
|
||||||
qualified names
|
2003-08-14 Bogdan Gheorghe
|
||||||
|
- Added forward declarations to index
|
||||||
2003-08-11 Bogdan Gheorghe
|
|
||||||
- Added macro declarations to the index
|
2003-08-12 Bogdan Gheorghe
|
||||||
- Added macro prefix to AbstractIndexer
|
- Changed var prefix in AbstractIndexer to pass in fully
|
||||||
|
qualified names
|
||||||
2003-08-07 Bogdan Gheorghe
|
|
||||||
- Added shutdown cleanup routine in IndexManager
|
2003-08-11 Bogdan Gheorghe
|
||||||
|
- Added macro declarations to the index
|
||||||
2003-07-28 Andrew Niefer
|
- Added macro prefix to AbstractIndexer
|
||||||
- added support for '?' wildcards in AbstractIndexer.bestPrefix
|
|
||||||
|
2003-08-07 Bogdan Gheorghe
|
||||||
2003-07-25 Bogdan Gheorghe
|
- Added shutdown cleanup routine in IndexManager
|
||||||
- Changed parser to COMPLETE mode
|
|
||||||
- Added functionRef, methodRef, typeRef, namespaceRef, fieldRef
|
2003-07-28 Andrew Niefer
|
||||||
|
- added support for '?' wildcards in AbstractIndexer.bestPrefix
|
||||||
Modified:
|
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java
|
2003-07-25 Bogdan Gheorghe
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/IIndexConstants.java
|
- Changed parser to COMPLETE mode
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexer.java
|
- Added functionRef, methodRef, typeRef, namespaceRef, fieldRef
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexerRequestor.java
|
|
||||||
|
Modified:
|
||||||
|
* index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java
|
||||||
2003-07-24 Andrew Niefer
|
* index/org/eclipse/cdt/internal/core/search/indexing/IIndexConstants.java
|
||||||
- added TYPE_ALL, FUNCTION_ALL, METHOD_ALL, NAMESPACE_ALL, FIELD_ALL constants to IIndexConstants
|
* index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexer.java
|
||||||
- modified AbstractIndexer prefix functions to properly handle searching for all occurences
|
* index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexerRequestor.java
|
||||||
|
|
||||||
2003-07-23 Andrew Niefer
|
|
||||||
Modified
|
2003-07-24 Andrew Niefer
|
||||||
*index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java
|
- added TYPE_ALL, FUNCTION_ALL, METHOD_ALL, NAMESPACE_ALL, FIELD_ALL constants to IIndexConstants
|
||||||
-changed so that the index prefixes contain the qualified names of the
|
- modified AbstractIndexer prefix functions to properly handle searching for all occurences
|
||||||
elements in reverse order.
|
|
||||||
-Added functions:
|
2003-07-23 Andrew Niefer
|
||||||
bestVariablePrefix
|
Modified
|
||||||
bestNamespacePrefix
|
*index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java
|
||||||
bestFieldPrefix
|
-changed so that the index prefixes contain the qualified names of the
|
||||||
bestFunctionPrefix
|
elements in reverse order.
|
||||||
bestMethodPrefix
|
-Added functions:
|
||||||
|
bestVariablePrefix
|
||||||
2003-07-21 Bogdan Gheorghe
|
bestNamespacePrefix
|
||||||
Added additional declarations to index: enums, enumerators, namespace,
|
bestFieldPrefix
|
||||||
functions, vars, methods, fields, typedefs.
|
bestFunctionPrefix
|
||||||
|
bestMethodPrefix
|
||||||
Fixed IndexManager to prevent individually added files from
|
|
||||||
being added to the index if indexing is not enabled for the project
|
2003-07-21 Bogdan Gheorghe
|
||||||
|
Added additional declarations to index: enums, enumerators, namespace,
|
||||||
Modified:
|
functions, vars, methods, fields, typedefs.
|
||||||
|
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java
|
Fixed IndexManager to prevent individually added files from
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/IIndexConstants.java
|
being added to the index if indexing is not enabled for the project
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/IndexManager.java
|
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexerRequestor.java
|
Modified:
|
||||||
|
|
||||||
2003-07-10 Bogdan Gheorghe
|
* index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java
|
||||||
Added bestTypeDeclarationPrefix to AbstractIndexer to allow the
|
* index/org/eclipse/cdt/internal/core/search/indexing/IIndexConstants.java
|
||||||
search engine to create a query string for the index.
|
* index/org/eclipse/cdt/internal/core/search/indexing/IndexManager.java
|
||||||
Changed encoding in AbstractIndexer to encode fully qualified names.
|
* index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexerRequestor.java
|
||||||
|
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java
|
2003-07-10 Bogdan Gheorghe
|
||||||
|
Added bestTypeDeclarationPrefix to AbstractIndexer to allow the
|
||||||
2003-07-03 Bogdan Gheorghe
|
search engine to create a query string for the index.
|
||||||
Updated copyright notices.
|
Changed encoding in AbstractIndexer to encode fully qualified names.
|
||||||
|
|
||||||
2003-06-25 Bogdan Gheorghe
|
* index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java
|
||||||
Added new Indexer framework:
|
|
||||||
|
2003-07-03 Bogdan Gheorghe
|
||||||
* index/org/eclipse/cdt/internal/core/index/IDocument.java
|
Updated copyright notices.
|
||||||
* index/org/eclipse/cdt/internal/core/index/IEntryResult.java
|
|
||||||
* index/org/eclipse/cdt/internal/core/index/IIndex.java
|
2003-06-25 Bogdan Gheorghe
|
||||||
* index/org/eclipse/cdt/internal/core/index/IIndexer.java
|
Added new Indexer framework:
|
||||||
* index/org/eclipse/cdt/internal/core/index/IIndexerOutput.java
|
|
||||||
* index/org/eclipse/cdt/internal/core/index/IQueryResult.java
|
* index/org/eclipse/cdt/internal/core/index/IDocument.java
|
||||||
|
* index/org/eclipse/cdt/internal/core/index/IEntryResult.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/Block.java
|
* index/org/eclipse/cdt/internal/core/index/IIndex.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/BlocksIndexInput.java
|
* index/org/eclipse/cdt/internal/core/index/IIndexer.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/BlocksIndexOutput.java
|
* index/org/eclipse/cdt/internal/core/index/IIndexerOutput.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/CodeByteStream.java
|
* index/org/eclipse/cdt/internal/core/index/IQueryResult.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/EntryResult.java
|
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/Field.java
|
* index/org/eclipse/cdt/internal/core/index/impl/Block.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/GammaCompressedIndexBlock.java
|
* index/org/eclipse/cdt/internal/core/index/impl/BlocksIndexInput.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/IFileDocument.java
|
* index/org/eclipse/cdt/internal/core/index/impl/BlocksIndexOutput.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/IIndexConstants.java
|
* index/org/eclipse/cdt/internal/core/index/impl/CodeByteStream.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/Index.java
|
* index/org/eclipse/cdt/internal/core/index/impl/EntryResult.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/IndexBlock.java
|
* index/org/eclipse/cdt/internal/core/index/impl/Field.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/IndexedFile.java
|
* index/org/eclipse/cdt/internal/core/index/impl/GammaCompressedIndexBlock.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/IndexedFileHashedArray.java
|
* index/org/eclipse/cdt/internal/core/index/impl/IFileDocument.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/IndexerOutput.java
|
* index/org/eclipse/cdt/internal/core/index/impl/IIndexConstants.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/IndexInput.java
|
* index/org/eclipse/cdt/internal/core/index/impl/Index.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/IndexOutput.java
|
* index/org/eclipse/cdt/internal/core/index/impl/IndexBlock.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/IndexSummary.java
|
* index/org/eclipse/cdt/internal/core/index/impl/IndexedFile.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/InMemoryIndex.java
|
* index/org/eclipse/cdt/internal/core/index/impl/IndexedFileHashedArray.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/Int.java
|
* index/org/eclipse/cdt/internal/core/index/impl/IndexerOutput.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/MergeFactory.java
|
* index/org/eclipse/cdt/internal/core/index/impl/IndexInput.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/PropertyDocument.java
|
* index/org/eclipse/cdt/internal/core/index/impl/IndexOutput.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/SafeRandomAccessFile.java
|
* index/org/eclipse/cdt/internal/core/index/impl/IndexSummary.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/SimpleIndexInput.java
|
* index/org/eclipse/cdt/internal/core/index/impl/InMemoryIndex.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/Util.java
|
* index/org/eclipse/cdt/internal/core/index/impl/Int.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/WordEntry.java
|
* index/org/eclipse/cdt/internal/core/index/impl/MergeFactory.java
|
||||||
* index/org/eclipse/cdt/internal/core/index/impl/WordEntryHashedArray.java
|
* index/org/eclipse/cdt/internal/core/index/impl/PropertyDocument.java
|
||||||
|
* index/org/eclipse/cdt/internal/core/index/impl/SafeRandomAccessFile.java
|
||||||
* index/org/eclipse/cdt/internal/core/search/CharOperation.java
|
* index/org/eclipse/cdt/internal/core/index/impl/SimpleIndexInput.java
|
||||||
* index/org/eclipse/cdt/internal/core/search/HashtableOfInt.java
|
* index/org/eclipse/cdt/internal/core/index/impl/Util.java
|
||||||
* index/org/eclipse/cdt/internal/core/search/SimpleLookupTable.java
|
* index/org/eclipse/cdt/internal/core/index/impl/WordEntry.java
|
||||||
* index/org/eclipse/cdt/internal/core/search/Util.java
|
* index/org/eclipse/cdt/internal/core/index/impl/WordEntryHashedArray.java
|
||||||
* index/org/eclipse/cdt/internal/core/search/message.properties
|
|
||||||
|
* index/org/eclipse/cdt/internal/core/search/CharOperation.java
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java
|
* index/org/eclipse/cdt/internal/core/search/HashtableOfInt.java
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/AddCompilationUnitToIndex.java
|
* index/org/eclipse/cdt/internal/core/search/SimpleLookupTable.java
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/AddFileToIndex.java
|
* index/org/eclipse/cdt/internal/core/search/Util.java
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/AddFolderToIndex.java
|
* index/org/eclipse/cdt/internal/core/search/message.properties
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/IIndexConstants.java
|
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/IndexAllProject.java
|
* index/org/eclipse/cdt/internal/core/search/indexing/AbstractIndexer.java
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/IndexManager.java
|
* index/org/eclipse/cdt/internal/core/search/indexing/AddCompilationUnitToIndex.java
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/IndexRequest.java
|
* index/org/eclipse/cdt/internal/core/search/indexing/AddFileToIndex.java
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/ReadWriteMonitor.java
|
* index/org/eclipse/cdt/internal/core/search/indexing/AddFolderToIndex.java
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/RemoveFolderFromIndex.java
|
* index/org/eclipse/cdt/internal/core/search/indexing/IIndexConstants.java
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/RemoveFromIndex.java
|
* index/org/eclipse/cdt/internal/core/search/indexing/IndexAllProject.java
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/SaveIndex.java
|
* index/org/eclipse/cdt/internal/core/search/indexing/IndexManager.java
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexer.java
|
* index/org/eclipse/cdt/internal/core/search/indexing/IndexRequest.java
|
||||||
* index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexerRequestor.java
|
* index/org/eclipse/cdt/internal/core/search/indexing/ReadWriteMonitor.java
|
||||||
|
* index/org/eclipse/cdt/internal/core/search/indexing/RemoveFolderFromIndex.java
|
||||||
|
* index/org/eclipse/cdt/internal/core/search/indexing/RemoveFromIndex.java
|
||||||
|
* index/org/eclipse/cdt/internal/core/search/indexing/SaveIndex.java
|
||||||
|
* index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexer.java
|
||||||
|
* index/org/eclipse/cdt/internal/core/search/indexing/SourceIndexerRequestor.java
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ import java.util.Locale;
|
||||||
import java.util.MissingResourceException;
|
import java.util.MissingResourceException;
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.internal.core.model.CModelManager;
|
||||||
import org.eclipse.core.resources.IContainer;
|
import org.eclipse.core.resources.IContainer;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
|
@ -360,6 +361,37 @@ public class Util {
|
||||||
if (CharOperation.pathMatch(exclusionPatterns[i], path, true, '/'))
|
if (CharOperation.pathMatch(exclusionPatterns[i], path, true, '/'))
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param string
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static boolean isCCFileName(String fileName) {
|
||||||
|
String[] sourceExtensions = CModelManager.sourceExtensions;
|
||||||
|
String[] headerExtensions = CModelManager.headerExtensions;
|
||||||
|
|
||||||
|
int dot =fileName.lastIndexOf(".");
|
||||||
|
|
||||||
|
//No extension, give benefit of doubt
|
||||||
|
if (dot == -1)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
//Extract extension
|
||||||
|
String extension = "";
|
||||||
|
if (dot + 1 <= fileName.length())
|
||||||
|
extension = fileName.substring(dot + 1);
|
||||||
|
|
||||||
|
for (int i=0; i<sourceExtensions.length; i++){
|
||||||
|
if (sourceExtensions[i].equals(extension))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i=0; i<headerExtensions.length; i++){
|
||||||
|
if (headerExtensions[i].equals(extension))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -97,15 +97,14 @@ public class IndexAllProject extends IndexRequest {
|
||||||
if (isCancelled) return false;
|
if (isCancelled) return false;
|
||||||
switch(proxy.getType()) {
|
switch(proxy.getType()) {
|
||||||
case IResource.FILE :
|
case IResource.FILE :
|
||||||
//TODO: BOG Put the file name checking back
|
if (Util.isCCFileName(proxy.getName())) {
|
||||||
//if (Util.isCCFileName(proxy.getName())) {
|
|
||||||
IResource resource = proxy.requestResource();
|
IResource resource = proxy.requestResource();
|
||||||
if (resource.getLocation() != null && (patterns == null || !Util.isExcluded(resource, patterns))) {
|
if (resource.getLocation() != null && (patterns == null || !Util.isExcluded(resource, patterns))) {
|
||||||
String name = new IFileDocument((IFile) resource).getName();
|
String name = new IFileDocument((IFile) resource).getName();
|
||||||
indexedFileNames.put(name, resource);
|
indexedFileNames.put(name, resource);
|
||||||
}
|
}
|
||||||
//}
|
}
|
||||||
// return false;
|
return false;
|
||||||
|
|
||||||
case IResource.FOLDER :
|
case IResource.FOLDER :
|
||||||
if (patterns != null && Util.isExcluded(proxy.requestResource(), patterns))
|
if (patterns != null && Util.isExcluded(proxy.requestResource(), patterns))
|
||||||
|
|
|
@ -31,8 +31,10 @@ import org.eclipse.cdt.internal.core.search.IndexSelector;
|
||||||
import org.eclipse.cdt.internal.core.search.SimpleLookupTable;
|
import org.eclipse.cdt.internal.core.search.SimpleLookupTable;
|
||||||
import org.eclipse.cdt.internal.core.search.processing.IJob;
|
import org.eclipse.cdt.internal.core.search.processing.IJob;
|
||||||
import org.eclipse.cdt.internal.core.search.processing.JobManager;
|
import org.eclipse.cdt.internal.core.search.processing.JobManager;
|
||||||
|
import org.eclipse.cdt.internal.core.sourcedependency.UpdateDependency;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.resources.IWorkspace;
|
import org.eclipse.core.resources.IWorkspace;
|
||||||
import org.eclipse.core.resources.ResourcesPlugin;
|
import org.eclipse.core.resources.ResourcesPlugin;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
|
@ -103,7 +105,6 @@ public class IndexManager extends JobManager implements IIndexConstants {
|
||||||
* Note: the actual operation is performed in background
|
* Note: the actual operation is performed in background
|
||||||
*/
|
*/
|
||||||
public void addSource(IFile resource, IPath indexedContainer){
|
public void addSource(IFile resource, IPath indexedContainer){
|
||||||
|
|
||||||
if (CCorePlugin.getDefault() == null) return;
|
if (CCorePlugin.getDefault() == null) return;
|
||||||
AddCompilationUnitToIndex job = new AddCompilationUnitToIndex(resource, indexedContainer, this);
|
AddCompilationUnitToIndex job = new AddCompilationUnitToIndex(resource, indexedContainer, this);
|
||||||
if (this.awaitingJobsCount() < MAX_FILES_IN_MEMORY) {
|
if (this.awaitingJobsCount() < MAX_FILES_IN_MEMORY) {
|
||||||
|
@ -113,6 +114,13 @@ public class IndexManager extends JobManager implements IIndexConstants {
|
||||||
request(job);
|
request(job);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void updateDependencies(IResource resource){
|
||||||
|
if (CCorePlugin.getDefault() == null) return;
|
||||||
|
UpdateDependency job = new UpdateDependency(resource);
|
||||||
|
|
||||||
|
request(job);
|
||||||
|
}
|
||||||
|
|
||||||
String computeIndexName(IPath path) {
|
String computeIndexName(IPath path) {
|
||||||
String name = (String) indexNames.get(path);
|
String name = (String) indexNames.get(path);
|
||||||
if (name == null) {
|
if (name == null) {
|
||||||
|
|
|
@ -5,7 +5,6 @@ package org.eclipse.cdt.internal.core.model;
|
||||||
* All Rights Reserved.
|
* All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import org.eclipse.cdt.core.CCorePlugin;
|
|
||||||
import org.eclipse.cdt.core.model.CModelException;
|
import org.eclipse.cdt.core.model.CModelException;
|
||||||
import org.eclipse.cdt.core.model.CoreModel;
|
import org.eclipse.cdt.core.model.CoreModel;
|
||||||
import org.eclipse.cdt.core.model.IArchiveContainer;
|
import org.eclipse.cdt.core.model.IArchiveContainer;
|
||||||
|
@ -15,20 +14,12 @@ import org.eclipse.cdt.core.model.ICElementDelta;
|
||||||
import org.eclipse.cdt.core.model.ICModel;
|
import org.eclipse.cdt.core.model.ICModel;
|
||||||
import org.eclipse.cdt.core.model.ICProject;
|
import org.eclipse.cdt.core.model.ICProject;
|
||||||
import org.eclipse.cdt.core.model.IParent;
|
import org.eclipse.cdt.core.model.IParent;
|
||||||
import org.eclipse.cdt.core.search.ICSearchConstants;
|
|
||||||
import org.eclipse.cdt.core.search.ICSearchScope;
|
|
||||||
import org.eclipse.cdt.core.search.SearchEngine;
|
|
||||||
import org.eclipse.cdt.internal.core.search.PathCollector;
|
|
||||||
import org.eclipse.cdt.internal.core.search.PatternSearchJob;
|
|
||||||
import org.eclipse.cdt.internal.core.search.indexing.IndexManager;
|
import org.eclipse.cdt.internal.core.search.indexing.IndexManager;
|
||||||
import org.eclipse.cdt.internal.core.search.matching.CSearchPattern;
|
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.resources.IResourceDelta;
|
import org.eclipse.core.resources.IResourceDelta;
|
||||||
import org.eclipse.core.resources.IWorkspaceRoot;
|
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.Path;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is used by <code>CModelManager</code> to convert
|
* This class is used by <code>CModelManager</code> to convert
|
||||||
|
@ -511,35 +502,8 @@ public class DeltaProcessor {
|
||||||
String fileExtension = resource.getFileExtension();
|
String fileExtension = resource.getFileExtension();
|
||||||
|
|
||||||
if ((fileExtension != null) &&
|
if ((fileExtension != null) &&
|
||||||
(isValidHeader(fileExtension)))
|
(isValidHeader(fileExtension))){
|
||||||
{
|
indexManager.updateDependencies(resource);
|
||||||
PathCollector pathCollector = new PathCollector();
|
|
||||||
//SubProgressMonitor subMonitor = (progressMonitor == null ) ? null : new SubProgressMonitor( progressMonitor, 5 );
|
|
||||||
ICSearchScope scope = SearchEngine.createWorkspaceScope();
|
|
||||||
CSearchPattern pattern = CSearchPattern.createPattern(resource.getLocation().toOSString(),ICSearchConstants.INCLUDE, ICSearchConstants.REFERENCES,ICSearchConstants.EXACT_MATCH,true);
|
|
||||||
IndexManager indexManager = CCorePlugin.getDefault().getCoreModel().getIndexManager();
|
|
||||||
indexManager.performConcurrentJob(
|
|
||||||
new PatternSearchJob(
|
|
||||||
(CSearchPattern) pattern,
|
|
||||||
scope,
|
|
||||||
pathCollector,
|
|
||||||
indexManager
|
|
||||||
),
|
|
||||||
ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
|
|
||||||
null );
|
|
||||||
|
|
||||||
String[] iPath = pathCollector.getPaths();
|
|
||||||
for (int i=0;i<iPath.length; i++){
|
|
||||||
IPath pathToReindex = new Path(iPath[i]);
|
|
||||||
IWorkspaceRoot workRoot = element.getCProject().getProject().getWorkspace().getRoot();
|
|
||||||
IFile fileToReindex = workRoot.getFile(pathToReindex);
|
|
||||||
|
|
||||||
if (fileToReindex!=null && fileToReindex.exists() ) {
|
|
||||||
if (VERBOSE)
|
|
||||||
System.out.println("Going to reindex " + fileToReindex.getName());
|
|
||||||
this.indexManager.addSource(fileToReindex,fileToReindex.getProject().getProject().getFullPath());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,241 +1,258 @@
|
||||||
2003-10-06 Bogdan Gheorghe
|
2003-10-23 Bogdan Gheorghe
|
||||||
- added createCFileSearchScope() to SearchEngine.java to improve
|
|
||||||
code complete performance
|
- Added AcceptMatchOperation to get around Bug 45324. The search
|
||||||
|
operation is no longer a WorkspaceModifyOperation (which used to
|
||||||
2003-10-01 Andrew Niefer
|
lock the workspace for the duration of search). Instead, we now
|
||||||
- fix bug 44026 by checking scope before reporting match in MatchLocator.report
|
lock the workspace only when we tag the resources with markers.
|
||||||
|
|
||||||
2003-10-01 Andrew Niefer
|
- Modified SearchEngine : we now receive a list of matches
|
||||||
- fix BasicSearchMatch.equals() for bug43988
|
from the search that we pass into the AcceptMatchOperation.
|
||||||
|
|
||||||
2003-09-30 Bogdan Gheorghe
|
- Modified MatchLocator to add matches to passed in list instead
|
||||||
- changed logging in JobManager to use new ICLogConstants
|
of reporting them right away
|
||||||
|
|
||||||
2003-09-30 Andrew Niefer
|
- Modified JobManager: -added in jobToIgnore parm to unblock dependency
|
||||||
-fix bug43862 - Cannot find macro delcarations using all occurences.
|
jobs
|
||||||
* modified CSearchPattern.createMacroPattern
|
|
||||||
|
|
||||||
2003-09-29 Andrew Niefer
|
2003-10-06 Bogdan Gheorghe
|
||||||
- fix bug 43062 outline is confused on operator methods containing spaces
|
- added createCFileSearchScope() to SearchEngine.java to improve
|
||||||
- modify CSearchPattern.scanForNames to use same naming convention as TokenDuple.toString()
|
code complete performance
|
||||||
- modify MatchLocator.report to use IASTOffsetableNamedElement.getNameEndOffset()
|
|
||||||
|
2003-10-01 Andrew Niefer
|
||||||
2003-09-29 Andrew Niefer
|
- fix bug 44026 by checking scope before reporting match in MatchLocator.report
|
||||||
-bug42911 - Search: cannot find beyond use of data member
|
|
||||||
- fix NPE's in BasicSearchMatch.equals & hashCode
|
2003-10-01 Andrew Niefer
|
||||||
|
- fix BasicSearchMatch.equals() for bug43988
|
||||||
2003-09-29 Andrew Niefer
|
|
||||||
-fix NPE if IScannerInfoProvider returns null IScannerInfo
|
2003-09-30 Bogdan Gheorghe
|
||||||
|
- changed logging in JobManager to use new ICLogConstants
|
||||||
2003-09-25 Andrew Niefer
|
|
||||||
- bug43129 - Cannot search for definitions of global variables
|
2003-09-30 Andrew Niefer
|
||||||
- check definitions for variables, fields, enumerators and namespaces
|
-fix bug43862 - Cannot find macro delcarations using all occurences.
|
||||||
- handle enter/exitLinkageSpecification
|
* modified CSearchPattern.createMacroPattern
|
||||||
* search/org/eclipse/cdt/internal/core/search/matching/MatchLocator.java
|
|
||||||
* search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
|
2003-09-29 Andrew Niefer
|
||||||
|
- fix bug 43062 outline is confused on operator methods containing spaces
|
||||||
2003-09-25 Bogdan Gheorghe
|
- modify CSearchPattern.scanForNames to use same naming convention as TokenDuple.toString()
|
||||||
- added SearchFor INCLUDE in ICSearchConstants
|
- modify MatchLocator.report to use IASTOffsetableNamedElement.getNameEndOffset()
|
||||||
- added acceptIncludeDeclaration to IIndexSearchRequestor
|
|
||||||
- modified PathCollector to acceptIncludeDeclarations
|
2003-09-29 Andrew Niefer
|
||||||
- modified CSearchPattern to create an IncludePattern
|
-bug42911 - Search: cannot find beyond use of data member
|
||||||
- added IncludePattern.java
|
- fix NPE's in BasicSearchMatch.equals & hashCode
|
||||||
|
|
||||||
2003-09-25 Andrew Niefer
|
2003-09-29 Andrew Niefer
|
||||||
- partial fix for 43664 Modify Matchlocator to not try and create a link if we have no
|
-fix NPE if IScannerInfoProvider returns null IScannerInfo
|
||||||
resource, instead just use the path
|
|
||||||
|
2003-09-25 Andrew Niefer
|
||||||
2003-09-23 Andrew Niefer
|
- bug43129 - Cannot search for definitions of global variables
|
||||||
fix bug 43498 Search with ? fails on first letter of second word
|
- check definitions for variables, fields, enumerators and namespaces
|
||||||
-modifications to CSearchPattern.scanForNames()
|
- handle enter/exitLinkageSpecification
|
||||||
-add getSimpleName to MethodDeclarationPattern
|
* search/org/eclipse/cdt/internal/core/search/matching/MatchLocator.java
|
||||||
|
* search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
|
||||||
2003-09-19 Andrew Niefer
|
|
||||||
fix bug 43327 Code Complete finds local variables
|
2003-09-25 Bogdan Gheorghe
|
||||||
- modified MatchLocator to not report local declarations when boolean is set
|
- added SearchFor INCLUDE in ICSearchConstants
|
||||||
- modified SearchEngine.search to take an additional parameter "excludeLocalDeclarations"
|
- added acceptIncludeDeclaration to IIndexSearchRequestor
|
||||||
|
- modified PathCollector to acceptIncludeDeclarations
|
||||||
2003-09-15 Andrew Niefer
|
- modified CSearchPattern to create an IncludePattern
|
||||||
- modify CSearchPattern to handle escaping wildcards (bug43063)
|
- added IncludePattern.java
|
||||||
- modify enterFunctionBody and enterMethodBody to fix bug42979
|
|
||||||
- search for Parameter References
|
2003-09-25 Andrew Niefer
|
||||||
|
- partial fix for 43664 Modify Matchlocator to not try and create a link if we have no
|
||||||
2003-09-13 Andrew Niefer
|
resource, instead just use the path
|
||||||
-Searching for Typedefs: (bug42902)
|
|
||||||
- modified setElementInfo in BasicSearchResultCollector
|
2003-09-23 Andrew Niefer
|
||||||
- added TYPEDEF to ICSearchConstants
|
fix bug 43498 Search with ? fails on first letter of second word
|
||||||
- modified CSearchPattern & ClassDeclarationPattern
|
-modifications to CSearchPattern.scanForNames()
|
||||||
- implemented acceptTypedef* in MatchLocator
|
-add getSimpleName to MethodDeclarationPattern
|
||||||
- modified BasicSearchMatch to implement Comparable
|
|
||||||
|
2003-09-19 Andrew Niefer
|
||||||
2003-09-11 Andrew Niefer
|
fix bug 43327 Code Complete finds local variables
|
||||||
- Modified ICSearchResultCollector.createMatch to not take a parent parameter
|
- modified MatchLocator to not report local declarations when boolean is set
|
||||||
- modified BasicSearchResultCollector to create the parent string from the fully qualified name of the node
|
- modified SearchEngine.search to take an additional parameter "excludeLocalDeclarations"
|
||||||
- modified MatchLocator to keep track of most recent declaration for reporting purposes
|
|
||||||
- modified MatchLocator.report to use the most recent declaration
|
2003-09-15 Andrew Niefer
|
||||||
|
- modify CSearchPattern to handle escaping wildcards (bug43063)
|
||||||
2003-09-09 Andrew Niefer
|
- modify enterFunctionBody and enterMethodBody to fix bug42979
|
||||||
pattern matching on function parameters:
|
- search for Parameter References
|
||||||
- modified scanForParameters in CSearchPattern
|
|
||||||
- added getParamString in CSearchPattern
|
2003-09-13 Andrew Niefer
|
||||||
- modified matchLevel in MethodDeclarationPattern
|
-Searching for Typedefs: (bug42902)
|
||||||
|
- modified setElementInfo in BasicSearchResultCollector
|
||||||
Enumeration references
|
- added TYPEDEF to ICSearchConstants
|
||||||
- modified acceptEnumeratorReference in MatchLocator
|
- modified CSearchPattern & ClassDeclarationPattern
|
||||||
|
- implemented acceptTypedef* in MatchLocator
|
||||||
2003-09-05 Andrew Niefer
|
- modified BasicSearchMatch to implement Comparable
|
||||||
- fix searching for enumerators
|
|
||||||
|
2003-09-11 Andrew Niefer
|
||||||
2003-09-03 Andrew Niefer
|
- Modified ICSearchResultCollector.createMatch to not take a parent parameter
|
||||||
- added CLASS_STRUCT to the SearchFor constants
|
- modified BasicSearchResultCollector to create the parent string from the fully qualified name of the node
|
||||||
- Modified CSearchPattern to handle CLASS_STRUCT
|
- modified MatchLocator to keep track of most recent declaration for reporting purposes
|
||||||
|
- modified MatchLocator.report to use the most recent declaration
|
||||||
2003-08-26 Bogdan Gheorghe
|
|
||||||
- Added debug tracing statements to SearchEngine
|
2003-09-09 Andrew Niefer
|
||||||
- Modified scanForNames in CSearchPattern to treat append
|
pattern matching on function parameters:
|
||||||
a token after "~" to allow for destructors search
|
- modified scanForParameters in CSearchPattern
|
||||||
- Added scope checking to MatchLocator
|
- added getParamString in CSearchPattern
|
||||||
- Added debug trace statements to MatchLocator
|
- modified matchLevel in MethodDeclarationPattern
|
||||||
|
|
||||||
2003-08-20 Bogdan Gheorghe
|
Enumeration references
|
||||||
- Changed matching and reporting functions to handle nodes
|
- modified acceptEnumeratorReference in MatchLocator
|
||||||
of type IElaboratedTypeSpecifier
|
|
||||||
|
2003-09-05 Andrew Niefer
|
||||||
2003-08-12 Bogdan Gheorghe
|
- fix searching for enumerators
|
||||||
- Rolled field and variable search patterns into one pattern, in
|
|
||||||
order to allow for qualified var searches
|
2003-09-03 Andrew Niefer
|
||||||
|
- added CLASS_STRUCT to the SearchFor constants
|
||||||
2003-08-11 Andrew Niefer
|
- Modified CSearchPattern to handle CLASS_STRUCT
|
||||||
- Added Macro ICSearchConstant
|
|
||||||
- Added acceptMacro to IIndexSearchRequestor and PathCollector
|
2003-08-26 Bogdan Gheorghe
|
||||||
- Added MacroDeclaration Pattern
|
- Added debug tracing statements to SearchEngine
|
||||||
- Rolled method and function patterns into one method pattern
|
- Modified scanForNames in CSearchPattern to treat append
|
||||||
- Added WorkingCopy support to search
|
a token after "~" to allow for destructors search
|
||||||
|
- Added scope checking to MatchLocator
|
||||||
2003-08-08 Bogdan Gheorghe
|
- Added debug trace statements to MatchLocator
|
||||||
- Added CreateSearchScope to create a search scope out of
|
|
||||||
CElements
|
2003-08-20 Bogdan Gheorghe
|
||||||
- Filled out CSearchScope to enable:
|
- Changed matching and reporting functions to handle nodes
|
||||||
- adding a project to scope, include referenced projects
|
of type IElaboratedTypeSpecifier
|
||||||
- adding individual CElements to scope
|
|
||||||
|
2003-08-12 Bogdan Gheorghe
|
||||||
2003-08-08 Andrew Niefer
|
- Rolled field and variable search patterns into one pattern, in
|
||||||
- add function parameter information to search results
|
order to allow for qualified var searches
|
||||||
|
|
||||||
2003-08-06 Andrew Niefer
|
2003-08-11 Andrew Niefer
|
||||||
- Create OrPattern which matches for search if any of its constituent patterns matches
|
- Added Macro ICSearchConstant
|
||||||
- modified MatchLocator to support the OrPattern
|
- Added acceptMacro to IIndexSearchRequestor and PathCollector
|
||||||
- searching for All occurences now uses the OrPattern
|
- Added MacroDeclaration Pattern
|
||||||
|
- Rolled method and function patterns into one method pattern
|
||||||
2003-08-01 Andrew Niefer
|
- Added WorkingCopy support to search
|
||||||
- Modified BasicSearchResultCollector to only accept matches it has not already seen
|
|
||||||
- fixed bug in finding a resource when entering includes
|
2003-08-08 Bogdan Gheorghe
|
||||||
|
- Added CreateSearchScope to create a search scope out of
|
||||||
2003-07-29 Andrew Niefer
|
CElements
|
||||||
Refactoring Search result collection:
|
- Filled out CSearchScope to enable:
|
||||||
- Modified ICSearchResultCollector
|
- adding a project to scope, include referenced projects
|
||||||
- Modified IMatch
|
- adding individual CElements to scope
|
||||||
- Modified MatchLocator to reflect changes in ICSearchResultCollector
|
|
||||||
- Created BasicSearchMatch implements IMatch
|
2003-08-08 Andrew Niefer
|
||||||
- Created BasicSearchResultCollector implements ICSearchResultCollector
|
- add function parameter information to search results
|
||||||
|
|
||||||
2003-07-28 Andrew Niefer
|
2003-08-06 Andrew Niefer
|
||||||
- added abstract CSearchPattern.resetIndexInfo fix bug with searching with globally
|
- Create OrPattern which matches for search if any of its constituent patterns matches
|
||||||
qualified names
|
- modified MatchLocator to support the OrPattern
|
||||||
- fixed bug in CSearchPattern.matchQualifications to do with globally qualified names
|
- searching for All occurences now uses the OrPattern
|
||||||
- fixed bug in CSearchPattern.createFunctionPattern to do with parameter lists.
|
|
||||||
|
2003-08-01 Andrew Niefer
|
||||||
2003-07-25 Bogdan Gheorghe
|
- Modified BasicSearchResultCollector to only accept matches it has not already seen
|
||||||
- Added refs to PathCollector
|
- fixed bug in finding a resource when entering includes
|
||||||
- Filled in feedIndexRequestor for the new search patterns
|
|
||||||
- Fixed the FunctionDeclarationPattern to work with no parms
|
2003-07-29 Andrew Niefer
|
||||||
|
Refactoring Search result collection:
|
||||||
2003-07-24 Andrew Niefer
|
- Modified ICSearchResultCollector
|
||||||
- Implemented decodeIndexEntry & matchIndexEntry for all patterns
|
- Modified IMatch
|
||||||
- changed MatchLocator to use a COMPLETE_PARSE.
|
- Modified MatchLocator to reflect changes in ICSearchResultCollector
|
||||||
|
- Created BasicSearchMatch implements IMatch
|
||||||
2003-07-23 Andrew Niefer
|
- Created BasicSearchResultCollector implements ICSearchResultCollector
|
||||||
-Changed ICSearchPattern.matchLevel to take a ISourceElementCallbackDelegate
|
|
||||||
-Changed ICSearchResultCollector.createMatch to take a ISourceElementCallbackDelegate
|
2003-07-28 Andrew Niefer
|
||||||
-first implementations of:
|
- added abstract CSearchPattern.resetIndexInfo fix bug with searching with globally
|
||||||
-CSearchPattern.createFunctionPattern
|
qualified names
|
||||||
-CSearchPattern.createVariablePattern
|
- fixed bug in CSearchPattern.matchQualifications to do with globally qualified names
|
||||||
-CSearchPattern.createMethodPattern
|
- fixed bug in CSearchPattern.createFunctionPattern to do with parameter lists.
|
||||||
-preliminary matching for remaining patterns
|
|
||||||
-handling of remaining parser callbacks
|
2003-07-25 Bogdan Gheorghe
|
||||||
-generating index Prefixes for the patterns
|
- Added refs to PathCollector
|
||||||
|
- Filled in feedIndexRequestor for the new search patterns
|
||||||
2003-07-14 Andrew Niefer
|
- Fixed the FunctionDeclarationPattern to work with no parms
|
||||||
-Modified SearchFor instances in ICSearchConstants to more closely match what we are searching for
|
|
||||||
-added IMatch interface, it represents matches found by the search engine, implementors can store
|
2003-07-24 Andrew Niefer
|
||||||
whatever information they like, see ICSearchResultCollector::createMatch
|
- Implemented decodeIndexEntry & matchIndexEntry for all patterns
|
||||||
-added createMatch to the ICSearchResultCollector interface, the result collector is responsible for
|
- changed MatchLocator to use a COMPLETE_PARSE.
|
||||||
implementing IMatch to store whatever data they want out of the AST nodes.
|
|
||||||
-added skeleton patterns:
|
2003-07-23 Andrew Niefer
|
||||||
search/org/eclipse/cdt/internal/core/search/matching/FieldDeclarationPattern.java
|
-Changed ICSearchPattern.matchLevel to take a ISourceElementCallbackDelegate
|
||||||
search/org/eclipse/cdt/internal/core/search/matching/FunctionDeclarationPattern.java
|
-Changed ICSearchResultCollector.createMatch to take a ISourceElementCallbackDelegate
|
||||||
search/org/eclipse/cdt/internal/core/search/matching/MethodDeclarationPattern.java
|
-first implementations of:
|
||||||
search/org/eclipse/cdt/internal/core/search/matching/NamespaceDeclarationPattern.java
|
-CSearchPattern.createFunctionPattern
|
||||||
search/org/eclipse/cdt/internal/core/search/matching/VariableDeclarationPattern.java
|
-CSearchPattern.createVariablePattern
|
||||||
-added beginnings of CSearchPattern::create*Pattern functions
|
-CSearchPattern.createMethodPattern
|
||||||
-modifications to MatchLocator to keep track of current scope
|
-preliminary matching for remaining patterns
|
||||||
-added CSearchPattern::matchQualifications
|
-handling of remaining parser callbacks
|
||||||
|
-generating index Prefixes for the patterns
|
||||||
2003-07-10 Bogdan Gheorghe
|
|
||||||
Provided implementation for ICSearchScope.java, CSearchScope.java
|
2003-07-14 Andrew Niefer
|
||||||
|
-Modified SearchFor instances in ICSearchConstants to more closely match what we are searching for
|
||||||
Hooked up new CWorkspaceScope, PathCollector, PatternSearchJob in SearchEngine.java
|
-added IMatch interface, it represents matches found by the search engine, implementors can store
|
||||||
|
whatever information they like, see ICSearchResultCollector::createMatch
|
||||||
Provided implementation for PatternSearchJob.java - PatternSearchJob is where the first part
|
-added createMatch to the ICSearchResultCollector interface, the result collector is responsible for
|
||||||
of the search occurs - using an IndexSelector to filter the indexes, it gets the indexes from
|
implementing IMatch to store whatever data they want out of the AST nodes.
|
||||||
the IndexManager and then uses the passed in pattern to find the index matched. Once it finds
|
-added skeleton patterns:
|
||||||
an index match it adds the file path to the PathCollector.
|
search/org/eclipse/cdt/internal/core/search/matching/FieldDeclarationPattern.java
|
||||||
|
search/org/eclipse/cdt/internal/core/search/matching/FunctionDeclarationPattern.java
|
||||||
Modified CSearchPattern - added support to find index entries.
|
search/org/eclipse/cdt/internal/core/search/matching/MethodDeclarationPattern.java
|
||||||
|
search/org/eclipse/cdt/internal/core/search/matching/NamespaceDeclarationPattern.java
|
||||||
Modified ClassDeclarationPattern - added support to decode, match and report
|
search/org/eclipse/cdt/internal/core/search/matching/VariableDeclarationPattern.java
|
||||||
index entries.
|
-added beginnings of CSearchPattern::create*Pattern functions
|
||||||
|
-modifications to MatchLocator to keep track of current scope
|
||||||
|
-added CSearchPattern::matchQualifications
|
||||||
Added:
|
|
||||||
* search/org/eclipse/cdt/internal/core/search/CWorkspaceScope.java
|
2003-07-10 Bogdan Gheorghe
|
||||||
* search/org/eclipse/cdt/internal/core/search/IIndexSearchRequestor.java
|
Provided implementation for ICSearchScope.java, CSearchScope.java
|
||||||
* search/org/eclipse/cdt/internal/core/search/IndexSelector.java
|
|
||||||
* search/org/eclipse/cdt/internal/core/search/PathCollector.java
|
Hooked up new CWorkspaceScope, PathCollector, PatternSearchJob in SearchEngine.java
|
||||||
|
|
||||||
Modified:
|
Provided implementation for PatternSearchJob.java - PatternSearchJob is where the first part
|
||||||
* search/org/eclipse/cdt/core/search/ICSearchScope.java
|
of the search occurs - using an IndexSelector to filter the indexes, it gets the indexes from
|
||||||
* search/org/eclipse/cdt/core/search/SearchEngine.java
|
the IndexManager and then uses the passed in pattern to find the index matched. Once it finds
|
||||||
* search/org/eclipse/cdt/internal/core/search/CSearchScope.java
|
an index match it adds the file path to the PathCollector.
|
||||||
* search/org/eclipse/cdt/internal/core/search/PatternSearchJob.java
|
|
||||||
* search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java
|
Modified CSearchPattern - added support to find index entries.
|
||||||
* search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
|
|
||||||
|
Modified ClassDeclarationPattern - added support to decode, match and report
|
||||||
2003-07-04 Andrew Niefer
|
index entries.
|
||||||
Modified ICSearchConstants to use new nested classes SearchFor and LimitTo instead of int
|
|
||||||
for stronger type safety
|
|
||||||
|
Added:
|
||||||
Updated MatchLocator to invoke parser to do actual search.
|
* search/org/eclipse/cdt/internal/core/search/CWorkspaceScope.java
|
||||||
|
* search/org/eclipse/cdt/internal/core/search/IIndexSearchRequestor.java
|
||||||
2003-06-27 Andrew Niefer
|
* search/org/eclipse/cdt/internal/core/search/IndexSelector.java
|
||||||
Modified:
|
* search/org/eclipse/cdt/internal/core/search/PathCollector.java
|
||||||
search/org.eclipse.cdt.core.search.matching/MatchLocator.java
|
|
||||||
- enter/exitInclusion
|
Modified:
|
||||||
- enterClassSpecifier
|
* search/org/eclipse/cdt/core/search/ICSearchScope.java
|
||||||
search/org.eclipse.cdt.core.search.matching/CSearchPattern.java
|
* search/org/eclipse/cdt/core/search/SearchEngine.java
|
||||||
- createClassPattern
|
* search/org/eclipse/cdt/internal/core/search/CSearchScope.java
|
||||||
- matchesName
|
* search/org/eclipse/cdt/internal/core/search/PatternSearchJob.java
|
||||||
search/org.eclipse.cdt.core.search.matching/ClassDeclarationPattern.java
|
* search/org/eclipse/cdt/internal/core/search/matching/ClassDeclarationPattern.java
|
||||||
- matchLevel
|
* search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
|
||||||
search/org.eclipse.cdt.core.search/ICSearchPattern.java
|
|
||||||
search/org.eclipse.cdt.core.search/ICSearchResultCollector.java
|
2003-07-04 Andrew Niefer
|
||||||
search/org.eclipse.cdt.core.search/SearchEngine.java
|
Modified ICSearchConstants to use new nested classes SearchFor and LimitTo instead of int
|
||||||
|
for stronger type safety
|
||||||
2003-06-25 Bogdan Gheorghe
|
|
||||||
Modified:
|
Updated MatchLocator to invoke parser to do actual search.
|
||||||
* search/org/eclipse/cdt/core/search/ICSearchConstants.java
|
|
||||||
* search/org/eclipse/cdt/internal/core/search/Utils.java
|
2003-06-27 Andrew Niefer
|
||||||
- moved to index/org/eclipse/cdt/internal/core/search/Utils.java
|
Modified:
|
||||||
* search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
|
search/org.eclipse.cdt.core.search.matching/MatchLocator.java
|
||||||
* search/org/eclipse/cdt/internal/core/search/processing/IJob.java
|
- enter/exitInclusion
|
||||||
|
- enterClassSpecifier
|
||||||
|
search/org.eclipse.cdt.core.search.matching/CSearchPattern.java
|
||||||
|
- createClassPattern
|
||||||
|
- matchesName
|
||||||
|
search/org.eclipse.cdt.core.search.matching/ClassDeclarationPattern.java
|
||||||
|
- matchLevel
|
||||||
|
search/org.eclipse.cdt.core.search/ICSearchPattern.java
|
||||||
|
search/org.eclipse.cdt.core.search/ICSearchResultCollector.java
|
||||||
|
search/org.eclipse.cdt.core.search/SearchEngine.java
|
||||||
|
|
||||||
|
2003-06-25 Bogdan Gheorghe
|
||||||
|
Modified:
|
||||||
|
* search/org/eclipse/cdt/core/search/ICSearchConstants.java
|
||||||
|
* search/org/eclipse/cdt/internal/core/search/Utils.java
|
||||||
|
- moved to index/org/eclipse/cdt/internal/core/search/Utils.java
|
||||||
|
* search/org/eclipse/cdt/internal/core/search/matching/CSearchPattern.java
|
||||||
|
* search/org/eclipse/cdt/internal/core/search/processing/IJob.java
|
||||||
* search/org/eclipse/cdt/internal/core/search/processing/JobManager.java
|
* search/org/eclipse/cdt/internal/core/search/processing/JobManager.java
|
|
@ -23,6 +23,7 @@ import org.eclipse.cdt.core.model.ICProject;
|
||||||
import org.eclipse.cdt.internal.core.Util;
|
import org.eclipse.cdt.internal.core.Util;
|
||||||
import org.eclipse.cdt.internal.core.model.CModelManager;
|
import org.eclipse.cdt.internal.core.model.CModelManager;
|
||||||
import org.eclipse.cdt.internal.core.model.IWorkingCopy;
|
import org.eclipse.cdt.internal.core.model.IWorkingCopy;
|
||||||
|
import org.eclipse.cdt.internal.core.search.AcceptMatchOperation;
|
||||||
import org.eclipse.cdt.internal.core.search.CSearchScope;
|
import org.eclipse.cdt.internal.core.search.CSearchScope;
|
||||||
import org.eclipse.cdt.internal.core.search.CWorkspaceScope;
|
import org.eclipse.cdt.internal.core.search.CWorkspaceScope;
|
||||||
import org.eclipse.cdt.internal.core.search.PathCollector;
|
import org.eclipse.cdt.internal.core.search.PathCollector;
|
||||||
|
@ -32,6 +33,7 @@ import org.eclipse.cdt.internal.core.search.matching.CSearchPattern;
|
||||||
import org.eclipse.cdt.internal.core.search.matching.MatchLocator;
|
import org.eclipse.cdt.internal.core.search.matching.MatchLocator;
|
||||||
import org.eclipse.core.resources.IFile;
|
import org.eclipse.core.resources.IFile;
|
||||||
import org.eclipse.core.resources.IWorkspace;
|
import org.eclipse.core.resources.IWorkspace;
|
||||||
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IPath;
|
import org.eclipse.core.runtime.IPath;
|
||||||
import org.eclipse.core.runtime.IProgressMonitor;
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
import org.eclipse.core.runtime.OperationCanceledException;
|
import org.eclipse.core.runtime.OperationCanceledException;
|
||||||
|
@ -164,7 +166,7 @@ public class SearchEngine implements ICSearchConstants{
|
||||||
|
|
||||||
/* search is starting */
|
/* search is starting */
|
||||||
collector.aboutToStart();
|
collector.aboutToStart();
|
||||||
|
ArrayList matches = new ArrayList();
|
||||||
try{
|
try{
|
||||||
//initialize progress monitor
|
//initialize progress monitor
|
||||||
IProgressMonitor progressMonitor = collector.getProgressMonitor();
|
IProgressMonitor progressMonitor = collector.getProgressMonitor();
|
||||||
|
@ -188,7 +190,8 @@ public class SearchEngine implements ICSearchConstants{
|
||||||
indexManager
|
indexManager
|
||||||
),
|
),
|
||||||
ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
|
ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH,
|
||||||
subMonitor );
|
subMonitor,
|
||||||
|
null );
|
||||||
|
|
||||||
subMonitor = (progressMonitor == null ) ? null : new SubProgressMonitor( progressMonitor, 95 );
|
subMonitor = (progressMonitor == null ) ? null : new SubProgressMonitor( progressMonitor, 95 );
|
||||||
|
|
||||||
|
@ -199,9 +202,12 @@ public class SearchEngine implements ICSearchConstants{
|
||||||
throw new OperationCanceledException();
|
throw new OperationCanceledException();
|
||||||
|
|
||||||
//TODO: BOG Filter Working Copies...
|
//TODO: BOG Filter Working Copies...
|
||||||
matchLocator.locateMatches( pathCollector.getPaths(), workspace, this.workingCopies);
|
matchLocator.locateMatches( pathCollector.getPaths(), workspace, this.workingCopies, matches);
|
||||||
} finally {
|
} finally {
|
||||||
collector.done();
|
AcceptMatchOperation acceptMatchOp = new AcceptMatchOperation(collector, matches);
|
||||||
|
try {
|
||||||
|
CCorePlugin.getWorkspace().run(acceptMatchOp,null);
|
||||||
|
} catch (CoreException e) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
/*
|
||||||
|
* Created on Oct 20, 2003
|
||||||
|
*
|
||||||
|
* To change the template for this generated file go to
|
||||||
|
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||||
|
*/
|
||||||
|
package org.eclipse.cdt.internal.core.search;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.search.ICSearchResultCollector;
|
||||||
|
import org.eclipse.cdt.core.search.IMatch;
|
||||||
|
import org.eclipse.core.resources.IWorkspaceRunnable;
|
||||||
|
import org.eclipse.core.runtime.CoreException;
|
||||||
|
import org.eclipse.core.runtime.IProgressMonitor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author bgheorgh
|
||||||
|
*
|
||||||
|
* To change the template for this generated type comment go to
|
||||||
|
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||||
|
*/
|
||||||
|
public class AcceptMatchOperation implements IWorkspaceRunnable {
|
||||||
|
|
||||||
|
ICSearchResultCollector collector;
|
||||||
|
ArrayList matches;
|
||||||
|
/**
|
||||||
|
* @param collector
|
||||||
|
*/
|
||||||
|
public AcceptMatchOperation(ICSearchResultCollector collector, ArrayList matches) {
|
||||||
|
this.collector = collector;
|
||||||
|
this.matches = matches;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see org.eclipse.core.resources.IWorkspaceRunnable#run(org.eclipse.core.runtime.IProgressMonitor)
|
||||||
|
*/
|
||||||
|
public void run(IProgressMonitor monitor) throws CoreException {
|
||||||
|
Iterator i = matches.iterator();
|
||||||
|
while (i.hasNext()){
|
||||||
|
IMatch match = (IMatch) i.next();
|
||||||
|
collector.acceptMatch(match);
|
||||||
|
}
|
||||||
|
collector.done();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -18,6 +18,7 @@ import java.io.FileNotFoundException;
|
||||||
import java.io.FileReader;
|
import java.io.FileReader;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -97,6 +98,8 @@ import org.eclipse.core.runtime.Path;
|
||||||
*/
|
*/
|
||||||
public class MatchLocator implements ISourceElementRequestor, ICSearchConstants {
|
public class MatchLocator implements ISourceElementRequestor, ICSearchConstants {
|
||||||
|
|
||||||
|
|
||||||
|
ArrayList matchStorage;
|
||||||
|
|
||||||
public static boolean VERBOSE = false;
|
public static boolean VERBOSE = false;
|
||||||
/**
|
/**
|
||||||
|
@ -328,8 +331,9 @@ public class MatchLocator implements ISourceElementRequestor, ICSearchConstants
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void locateMatches( String [] paths, IWorkspace workspace, IWorkingCopy[] workingCopies ){
|
public void locateMatches( String [] paths, IWorkspace workspace, IWorkingCopy[] workingCopies,ArrayList matches ){
|
||||||
|
matchStorage = matches;
|
||||||
workspaceRoot = (workspace != null) ? workspace.getRoot() : null;
|
workspaceRoot = (workspace != null) ? workspace.getRoot() : null;
|
||||||
|
|
||||||
HashMap wcPaths = new HashMap();
|
HashMap wcPaths = new HashMap();
|
||||||
|
@ -495,7 +499,9 @@ public class MatchLocator implements ISourceElementRequestor, ICSearchConstants
|
||||||
match = resultCollector.createMatch( currentPath, offset, end, object );
|
match = resultCollector.createMatch( currentPath, offset, end, object );
|
||||||
}
|
}
|
||||||
if( match != null ){
|
if( match != null ){
|
||||||
resultCollector.acceptMatch( match );
|
//Save till later
|
||||||
|
//resultCollector.acceptMatch( match );
|
||||||
|
matchStorage.add(match);
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
|
|
|
@ -188,8 +188,9 @@ public abstract class JobManager implements Runnable {
|
||||||
public boolean performConcurrentJob(
|
public boolean performConcurrentJob(
|
||||||
IJob searchJob,
|
IJob searchJob,
|
||||||
int waitingPolicy,
|
int waitingPolicy,
|
||||||
IProgressMonitor progress) {
|
IProgressMonitor progress,
|
||||||
|
IJob jobToIgnore) {
|
||||||
|
|
||||||
if (VERBOSE)
|
if (VERBOSE)
|
||||||
JobManager.verbose("STARTING concurrent job - " + searchJob); //$NON-NLS-1$
|
JobManager.verbose("STARTING concurrent job - " + searchJob); //$NON-NLS-1$
|
||||||
if (!searchJob.isReadyToRun()) {
|
if (!searchJob.isReadyToRun()) {
|
||||||
|
@ -250,7 +251,8 @@ public abstract class JobManager implements Runnable {
|
||||||
}
|
}
|
||||||
this.awaitingClients++;
|
this.awaitingClients++;
|
||||||
}
|
}
|
||||||
while ((awaitingWork = awaitingJobsCount()) > 0) {
|
while (((awaitingWork = awaitingJobsCount()) > 0)
|
||||||
|
&& (!jobShouldBeIgnored(jobToIgnore))) {
|
||||||
if (subProgress != null && subProgress.isCanceled())
|
if (subProgress != null && subProgress.isCanceled())
|
||||||
throw new OperationCanceledException();
|
throw new OperationCanceledException();
|
||||||
currentJob = currentJob();
|
currentJob = currentJob();
|
||||||
|
@ -295,6 +297,20 @@ public abstract class JobManager implements Runnable {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param jobToIgnore
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private boolean jobShouldBeIgnored(IJob jobToIgnore) {
|
||||||
|
if (jobToIgnore == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (currentJob() == jobToIgnore)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public abstract String processName();
|
public abstract String processName();
|
||||||
|
|
||||||
public synchronized void request(IJob job) {
|
public synchronized void request(IJob job) {
|
||||||
|
|
|
@ -27,6 +27,7 @@ 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;
|
||||||
|
import org.eclipse.jface.operation.IRunnableWithProgress;
|
||||||
import org.eclipse.jface.resource.ImageDescriptor;
|
import org.eclipse.jface.resource.ImageDescriptor;
|
||||||
import org.eclipse.ui.actions.WorkspaceModifyOperation;
|
import org.eclipse.ui.actions.WorkspaceModifyOperation;
|
||||||
|
|
||||||
|
@ -36,7 +37,7 @@ import org.eclipse.ui.actions.WorkspaceModifyOperation;
|
||||||
* To change the template for this generated type comment go to
|
* To change the template for this generated type comment go to
|
||||||
* Window>Preferences>Java>Code Generation>Code and Comments
|
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||||
*/
|
*/
|
||||||
public class CSearchOperation extends WorkspaceModifyOperation implements ICSearchConstants{
|
public class CSearchOperation implements IRunnableWithProgress,ICSearchConstants{
|
||||||
public CSearchOperation(IWorkspace workspace, String pattern, boolean caseSensitive, List searchFor, LimitTo limitTo, ICSearchScope scope, String scopeDescription, CSearchResultCollector collector) {
|
public CSearchOperation(IWorkspace workspace, String pattern, boolean caseSensitive, List searchFor, LimitTo limitTo, ICSearchScope scope, String scopeDescription, CSearchResultCollector collector) {
|
||||||
this( workspace, limitTo, scope, scopeDescription, collector );
|
this( workspace, limitTo, scope, scopeDescription, collector );
|
||||||
_stringPattern = pattern;
|
_stringPattern = pattern;
|
||||||
|
@ -56,8 +57,7 @@ public class CSearchOperation extends WorkspaceModifyOperation implements ICSear
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
* @see org.eclipse.ui.actions.WorkspaceModifyOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
|
* @see org.eclipse.ui.actions.WorkspaceModifyOperation#execute(org.eclipse.core.runtime.IProgressMonitor)
|
||||||
*/
|
*/
|
||||||
protected void execute(IProgressMonitor monitor)
|
public void run(IProgressMonitor monitor)throws InvocationTargetException
|
||||||
throws CoreException, InvocationTargetException, InterruptedException
|
|
||||||
{
|
{
|
||||||
_collector.setProgressMonitor( monitor );
|
_collector.setProgressMonitor( monitor );
|
||||||
|
|
||||||
|
@ -79,6 +79,8 @@ public class CSearchOperation extends WorkspaceModifyOperation implements ICSear
|
||||||
}
|
}
|
||||||
|
|
||||||
engine.search( _workspace, pattern, _scope, _collector, false );
|
engine.search( _workspace, pattern, _scope, _collector, false );
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -147,5 +149,6 @@ public class CSearchOperation extends WorkspaceModifyOperation implements ICSear
|
||||||
private LimitTo _limitTo;
|
private LimitTo _limitTo;
|
||||||
private List _searchFor;
|
private List _searchFor;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,6 +54,7 @@ public class CSearchResultCollector extends BasicSearchResultCollector{
|
||||||
_matchCount = 0;
|
_matchCount = 0;
|
||||||
|
|
||||||
_view = SearchUI.getSearchResultView();
|
_view = SearchUI.getSearchResultView();
|
||||||
|
|
||||||
|
|
||||||
CSearchResultLabelProvider labelProvider = new CSearchResultLabelProvider();
|
CSearchResultLabelProvider labelProvider = new CSearchResultLabelProvider();
|
||||||
labelProvider.setOrder( CSearchResultLabelProvider.SHOW_PATH );
|
labelProvider.setOrder( CSearchResultLabelProvider.SHOW_PATH );
|
||||||
|
|
|
@ -513,7 +513,7 @@ public class CCompletionProcessor implements IContentAssistProcessor {
|
||||||
//Get file's dependencies
|
//Get file's dependencies
|
||||||
try {
|
try {
|
||||||
IndexManager indexMan = CCorePlugin.getDefault().getCoreModel().getIndexManager();
|
IndexManager indexMan = CCorePlugin.getDefault().getCoreModel().getIndexManager();
|
||||||
indexMan.performConcurrentJob(new DependencyQueryJob(project, (IFile)actualFile, indexMan, dependencies), ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, null);
|
indexMan.performConcurrentJob(new DependencyQueryJob(project, (IFile)actualFile, indexMan, dependencies), ICSearchConstants.WAIT_UNTIL_READY_TO_SEARCH, null, null);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue