Add tracing to org.eclipse.text text stores#3801
Add tracing to org.eclipse.text text stores#3801trancexpress wants to merge 2 commits intoeclipse-platform:masterfrom
Conversation
|
The debug options in Since the plug-in is not a singleton, there is no activator and no options. So we cannot create a regular debug trace. |
|
The trace messages look like this: The ones from the usual debug tracing look like this: |
|
@trancexpress in general there is no need to create an Issue and then a PR with only "fixes" as it create only much notifications. So unless you just want to document a problem (that other maybe work on) just create a PR with a meaningful title and description also for the commit message so it is clear why it is changed (the what is visible from the git diff already). This way one don't really need to lookup the issue first to understand what a PR does, you have less clicks and people who watch the repository has less mails to read. |
laeubi
left a comment
There was a problem hiding this comment.
Since the plug-in is not a singleton, there is no activator and no options.
This is completely unrelated. Any Bundle can have an Activator and if there is none but you need it (e.g. for tracing) then please do so instead of inventing an own Tracing facility (what then lacks configuration through UI and a like).
Also an Activator is not the only way to get hold of the tracing so if you need help let us know but platform already contains a lot of examples how tracing can be used.
47959e7 to
7b92501
Compare
Ah, thank you for the hint! Can you check the change now? I'm not sure about the Also are there some examples in platform how to set debug tracing options per preferences? I keep forgetting how that works... |
|
I wonder if we should also adjust these: Now that there is proper tracing... The Still, changing |
|
In the Run config there is a "tracing" tab and inside the IDE you can go to Window>Preferences>General>Tracing |
I meant programmatically, ftom a test. |
bundles/org.eclipse.text/src/org/eclipse/text/internal/TextPlugin.java
Outdated
Show resolved
Hide resolved
| org.eclipse.jface.text.templates; text="split"; mandatory:="text", | ||
| org.eclipse.text.edits, | ||
| org.eclipse.text.html, | ||
| org.eclipse.text.internal, |
There was a problem hiding this comment.
You should not export this package and that's likely why you get warnings with since tag. The name does not matter this is now public API!
There was a problem hiding this comment.
@laeubi please advise how to avoid the export of the package. Or, I've changed it to have the internal attribute, is this enough?
I need to enable the debug option in: org.eclipse.jdt.ui.tests.quickfix.SaveParticipantTest.setUp()
E.g. JDT verbose mode is enabled like this:
@Override
public void setUp() throws Exception {
...
JavaModelManager.VERBOSE = true;
You mean only during the execution of one test method? Apart from that test of course can also be executed with tracing (in the UI and Tycho). Apart from that you can modify it at runtime with the |
If we can use proper tracing why not... |
How do I get to the I'm still not sure how to enable debug in With the exported package, all I need in the test is: |
This change adds an activator to org.eclipse.text, as well as debug tracing to set/replace methods in CopyOnWriteTextStore and GapTextStore. Fixes: eclipse-platform#3800
|
This pull request changes some projects for the first time in this development cycle. An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patchFurther information are available in Common Build Issues - Missing version increments. |
|
On MacOS a test failed: On Windows something broke: |
Fixes: #3800