Community
Participate
Working Groups
The CDT installs the C/C++ document partitioner in Java documents. (In fact, it appears to install its document partitioner in every document.) This prevents MarkerResolutions extension (see extension point org.eclipse.ui.ide.markerResolution) that work against markers in Javadoc comments from working. Disabling the CDT resolves the issue. With regard the this problem, there are a number of areas where CDT code is questionable: * the use of extensions="*" in the org.eclipse.core.filebuffers.documentSetup and org.eclipse.core.filebuffers.documentCreation extensions obligates the CDT to ensure its actions are appropriate - currently, the code assumes installing CDT behavior is always appropriate (hence the presence of a C++ document partitioner in Java documents). * The C++ document partitioner is installed as IDocumentExtension3.DEFAULT_PARTITIONING (See CTextTools.setCDocumentPartitioner()). In comparition, the Java document partitioner is installed under a unique name (__java_partitioning). Changing the CDT to use a unique partition name allows my MarkerResolutions to run. I'm not sure what impact this has on the C++ editor, though.
> * the use of extensions="*" in the org.eclipse.core.filebuffers.documentSetup Correct, we can not fix this until 72796: https://bugs.eclipse.org/bugs/show_bug.cgi?id=72796 is fixed > * The C++ document partitioner is installed as > IDocumentExtension3.DEFAULT_PARTITIONING We would need to do some refactoring but that sounds good to me Definitive 3.0 material
*** Bug 80090 has been marked as a duplicate of this bug. ***
The partitioner being installed is breaking any and all partitioning-dependent behavior in the WTP SSE editors. Text frameworks in Eclipse and elsewhere not aware of IDocumentExtension3 are left using the CDT partitioner by default even in SSE documents. SSE has its own IDocument implementation which must be used by our editors and has corresponding document factories installed for its content types. By overriding the default partitioner, the CDT *just by being present* disables our syntax highlighting and content assist.
This PR covers two things: - The use of the "*" wildcard to set the document This is now fix in the head, we use the content-type attribute to restrict the document setup. The second part is a suggestion to use a uniq partition name. Not implemented yet, bug remains open but no longer a blocker.
At the monthly CDT conference call (June 2005). We agreed that it is invalid to have a defect assigned to a inbox owner AND set to a valid release (they should be assigned to future). The June 3/2005 deadline for triaging these defects has passes, so I am moving all the remaining ones to future.
(In reply to comment #1) > > * the use of extensions="*" in the org.eclipse.core.filebuffers.documentSetup > Correct, we can not fix this until 72796: > https://bugs.eclipse.org/bugs/show_bug.cgi?id=72796 > is fixed Is this still an issue in 3.0? All the blocked & depending defects are closed.
(In reply to comment #6) > Is this still an issue in 3.0? > All the blocked & depending defects are closed.
>Text frameworks in Eclipse and elsewhere not >aware of IDocumentExtension3 are left using the CDT partitioner by default even >in SSE documents. Can you give pointers which parts of the text framework do not support IDocumentExtension3? NOTE: if SSE switches to use IDocumentExtension3 plus its own partitioning (ID) SSE should be fine and no longer be broken by other plug-ins that modify the default partitioning. Of course things like code assist, reconciler etc. must have the correct partitioning set (see SourceViewerConfiguration.getConfiguredDocumentPartitioning(ISourceViewer)).
>The second part is a suggestion to use a uniq partition name. >Not implemented yet, bug remains open but no longer a blocker. Note that for 3.2 Platform Text will detect extensions that do not use IDocumentExtension3 for setting the partitioner and write a log entry for each document setup.
Created attachment 37317 [details] Patch against CDT 3.1 (HEAD) Use a CDT specific partitioning for (almost) all C documents. See also bug 132702 (duplicate).
Excellent. Thanks. The patch looks good. I'll have to give it a run to make sure it doesn't break anything.
*** Bug 132702 has been marked as a duplicate of this bug. ***
I have applied the patch. The warning that Eclipse 3.2 was giving about the CDT registering as a default partitioner (or something) has gone away.