How Can I Turn on Word Wrap for the Eclipse XQuery Plugin?
It does not seem to be in the window preferences section.
We Are currently working also on the code formatter. Therefore wrapping is not currently supported in the XQDT editor. I also don't see a workaround for it either. But I took a note about this. Follow us on twitter #XQDT too see when we come up with something new. The formatter will also com but not in the very near future.
It is in the Window Preferences section even without the plugin. Try going to
Window > Preferences > Java > Code Style > Formatter
create a new eclipse profile then set the maximum line width to whatever you want under the 'line wrapping' tab. apply the feature and click 'Ok'.
Related
I added the sysout in the Eclipse template, context as Java statements and Pattern as System.out.println(${word_selection}${});${cursor} but still when I try typing "sysout" and press Ctrl + Space, it says "No default proposal".
Please help me how to figure this out, I am using MyEclipse version -8.6
I had the same problem, but it turned out I was typing a code snippet outside of a method, so Eclipse correctly decided not to propose this template. How silly!
Eclipse > Preferences > Java > Editor > Content Assistant > Advanced
Make sure Template Proposals is checked in one of the shown lists.
You shouldn't need to add the template as it should already be there under Java->Editor->Templates. Ensure that you have ticked the checkbox at the beginning of the template definition. Also make sure that you're pressing Ctrl+Space with the text cursor positioned immediately after the "t" in "sysout". This works for me.
In my case, I had the Apache POI library referenced in my project which added the SystemOutLogger to the list of things to insert.
'sysout' will only be auto inserted if it is the only thing in the
list.
I am trying to develop an eclipse plugin that does some documentation check on java code and highlights some lines of code in the editor.
To achieve my goal, I DON'T want to create a new editor in eclipse, I simply want to extend the default java editor to draw a line under (or highlight) the methods that do not satisfy some set of predetermined requirements.
Do I need to create a PresentationReconciler? If yes, how do I make the JDT or workbench use my reconciler.
I have never done plugin development and this is my first attempt.
Several starting points for you:
Annotations are an UI feature of JFace's text editor that allows you to visually mark some places in an open editor.
Markers are a Workbench feature, more high-level. They are generic "objects that may be associated with Workbench resources", and they can display in several places: in text editors (as annotations) or in the Problems view, for example.
Depending on what you want to do, you would plug in your plug-in into extension points related to either of those.
The Eclipse Java editor is located in the org.eclipse.jdt.internal.ui.javaeditor.JavaEditor package.
The "internal" in the package name means that the Eclipse development team can change how the Java editor works with new revisions.
Try this help page: Juno Help on syntax highlighting
At the end of the page, it describes how to dynamically add a PresentationReconciler, which is used for syntax highlighting. See if that fits the problem that you want to solve.
I assume you already have a plugin project.
In your plugin.xml, open the tab Extensions, click Add..., search for org.eclipse.ui.editors, then you should see a template named Editor, which will produce a simple xml editor to experiment and play with. Also, you will be able to see the needed structure to define a custom editor.
Hope this helps...
I don't know if you still have a need for this, but you are going to want to use Annotations to keep track of what parts of the editor you need to highlight.
For actually doing the graphical effect of highlighting, you could do syntax highlighting via a PresentationReconciler, but I have no experience with that.
We used a technique we borrowed from http://editbox.sourceforge.net/, replacing the background image of the editor Shell. Its open source, so check it out. (Our code might also help -- its at https://github.com/IDE4edu/EclipseEditorOverlay )
When i started to use Eclipse's Content Assist, Eclipse used to give me Javadoc help of item i focus in a tooltip box next to content assist. However, after a while Javadoc tooltip stopped working. I tried resetting preferences to default but no luck. What should i do?
p.s: Javadoc works when i highlight an element (i.e. a method).
I mingled with various options for 4 hours...even created a new workspace. Finally what worked for me was some preference changes.
Goto Preferences > Java > Editor > Content Assist, click on Restore Defaults.
Restart Eclipse and you are good to go.
You could try checking you have the latest version (and possibly reinstalling) xulrunner. That's Mozilla's platform independent GUI library, and as far as I'm aware it's used to display the javadoc, both content assist popups and in the javadoc tab. The likely cause of your problem is bugs/communication difficulties between eclipse and xulrunner.
I was facing the same problem here, and then, armed with Gaurav Kumar tip, I managed to solve it.
The problem here was that I had put a lower auto activation delay value. When I put it back to 200 and restarted Eclipse, the javadocs came back.
I solved the problem by changing Preferences > Java > Editor > Content Assist -> Auto Activation -> Auto activation triggers for Javadoc from "##" to "#".
I love Eclipse but I HATE auto-completion with a vengeance! I swear though, no matter how hard I look in prefs or Google I can't find where I turn this off!
I'm having the problem with both CFEclipse and the PHP editor.
How do I completely disable all "smart" quotes/tags/braces auto-inserting. Not some of it.. ALL of it. No matter how many options I untick both editors keep trying to finish my code for me.. usually with irritating results. Like this one (PHP editor):
<img alt="banner" src="/images/banner.jpg"></img>
This is HTML, not XHTML - I don't want, or need, my img tags closed.
Anyway this is still happening after I've gone to Preferences | PHP | Editor | Typing and Preferences | PHP | Editor | Code Assist and unchecked every option.
I can't be the only one having this issue but I can't find any howtos or help on this.
Well I found how to stop the tags auto-closing. For some reason it's under the Web | HTML Files preferences (even for a PHP file). I realise PHP is embedded in HTML but it seems odd the way the Editor options cross over like this. You need to restart Eclipse for this change to work.
I don't know how to find the Web | HTML Files Preferences section of cfeclipse configuration. The best I could find for this utterly infuriating so-called feature is this:
Go to Window -> Preferences -> CFEclipse -> Editor Then set Insight Delay to 9999. This won't turn it off but as good as. (Thank you House of Fusion for confirming my action).
You can find the HTML content assist in:
Window > Preferences > Web > HTML Files > Editor > Content Assist
and uncheck the "Automatically Make Suggestions" checkbox in the "Auto Activation" Panel
(used Linux Version of Eclipse Juno)
Found it (it IS hard to find, I know). It's:
Window > Preferences > Web > HTML Files > Editor > Typing (a LOT of steps, I know), then you can uncheck the boxes :).
Same issue, a slightly different location : looks like this is to be unplugged for each different programming language we use.
For Java, I had to look in :
(window / preferences) Java > Editor > Content Assist, frame "Auto Activation", uncheck "Enable auto activation"
For Linux version of Eclipse Juno, find it in:
Window > Preferences > Java > Editor > Content Assist. then uncheck "Enable auto activation" from the "Auto Activation" Panel
Then Eclipse and I can work together...
Yes, code completion and it's family are VERY irritating and it's hard to find the right checkbox.
Windows->Preferences. And then look at all the choices for editors. You will find the place.
I'm using Flash Builder and encounter the same annoyance with the Actionscript editor.
I was trying to disable this for Javascript, and my environment was not set up the way the other answers were describing. I had to go to:
Window > Preferences > Aptana Studio > Editors > JavaScript > Content Assist
There I had to empty the textboxes for:
display proposals
display contextual info
insert proposal
Now it shows me suggestions, which is great, but no longer forces its favorite suggestion on me when it thinks it's appropriate. It was turning:
this.
...into:
thistory.
THISTORY? What on earth is THISTORY? I'm glad that annoyance is over.
To disable autoclosing for brackets and HTML tags you shall go:
Preferences -> PHP / Web -> Editor -> Typing
then unchek all you need :)
I tried unchecking AutoActivation in ContentAssist for the Java Editor in hopes of disabling SmartInsert. But that failed. Best I could do was to go to Windows>Preferences>Java>Editor>Typing. Then uncheck both the Indentation boxes and Adjust Indentation in When pasting. That disabled the parts of SmartInsert that annoyed me the most. Should work the same for other editors. It is a shame there seems to be no way to disable it altogether.
In most of the IDEs, I had a Reindent All command. How do I do that in Eclipse 1.2?
Edit: The commands work with Java codes but is there a way I can get it to work with Clojure?
Ctrl+Shift+F
will format all your code according to active formatting rules, this includes any indentation rules you defined (tabs/spaces, amount of those, etc...)
You can change those rules at:
Window > Preferences
Java > Code Style > Formatter
Is CRTL+SHIFT+F working in eclipse 1.2 ?
In 3.5 is working fine.
You can also select all the code you want to indent, and then hit CTRL + I
Eclipse is up to version 3.5 now. You might want to upgrade.
To format your code however you like, including indentation and a dozen other minute details that you might care about, you can set Formatter options (under Preferences / Java / Code Style / Formatter). You can also tell Eclipse to run the Formatter on every save, along with other rules.
TAB and SHIFT+TAB should also work for selected lines of code/text - provided your tab character is configured to be equal to your indent space count.