editor

How do I attach some cached information to an Eclipse editor or resource?

我的未来我决定 提交于 2019-12-24 01:53:39
问题 I'm developing a DSL using Eclipse's Xtext framework. For the content assist/code completion, I have an expensive process which generates me a list of strings. How do I cache the result of that process? Long story: My DSL interfaces with Groovy scripts. The scripts provide methods which I offer in certain places in my DSL. This is pretty slow, even when I use a regexp to parse the methods of the scripts. So I'd like to cache the results of the script analysis. From my analysis, the analysis

Adobe CQ5 regex that will reject an entire string if either of 2 different substrings are found within the string

好久不见. 提交于 2019-12-23 23:14:16
问题 Adobe CQ5 dialog editor, regex property: I am regex challenged so forgive me, but it seems a simple task and I just can't seem to find the right fit elsewhere on the internet. Every suggestion that looks right just doesn't seem to work in adobe's regex field. I want the content admin to supply a relative URL to a "thank you" page. I don't need anything super fancy, I simply want to reject the admin's input if "http" or ".com" is found anywhere within the text supplied by the admin. Examples

Catch unhandled exceptions from editor

雨燕双飞 提交于 2019-12-23 21:19:48
问题 We are using MEF within our WPF application (MVVM) to embedd external editors. At some point in our main view there is a content element where the editor is going to be placed in. Now we would like to catch any unhandled exception from that editor and then reload the editor. The only thing I have found is to use DispatcherUnhandledException from the Application class. From there I would have to somehow reach the main view editor and tell it to reload the crashed editor. I was wondering if

Slow tab switching in Vim with large terminal

亡梦爱人 提交于 2019-12-23 19:43:49
问题 My vim is very slow to switch tabs ( :tabnext ) when i've fullscreened my terminal (1920x1200). Does anyone have a fix for this? Is it a vim issue, or is it my setup? Redrawing a black terminal (gnome-terminal) with a bit of text shouldn't be that hard. 回答1: It is probably the gnome-terminal problem. Vim with my fullscreen (1920x1080) rxvt-unicode (urxvtc) terminals works just fine. 来源: https://stackoverflow.com/questions/2864084/slow-tab-switching-in-vim-with-large-terminal

How to implement Quick Fix / Quick Assist for custom eclipse editor?

情到浓时终转凉″ 提交于 2019-12-23 17:23:40
问题 I have extended org.eclipse.ui.editors.text.TextEditor to implement a custom editor. For this editor, I have defined a marker type ( org.eclipse.core.resources.markers extension point) and an annotation type ( org.eclipse.ui.editors.annotationTypes extension point) to mark specific parts of code in my editor. I use a reconciler to update my annotation model. Now I want to add a quick fix / quick assist feature. I simply want eclipse, to show a box with proposals, when I hover over an

programmatically change the background color in eclipse

本小妞迷上赌 提交于 2019-12-23 16:27:37
问题 I have a question related to eclipse plugin development. Is there any means by which I can programmatically change the background color in eclipse. I am able to change the text foreground color by calling setTextColor(color, offset, length, controlRedraw) in ITextViewer but I don't find any function by which I can change the background color of the text. If anyone has been through this kindly share your thoughts. Thanks arav 回答1: I am not sure this can be done easily, short of extending your

How can I scroll left and right in Eclipse editor with the keyboard without moving the cursor?

耗尽温柔 提交于 2019-12-23 12:14:04
问题 To scroll within the Eclipse editor without moving the cursor up and down one can use CTRL+Down or CTRL+Up . But what about left and right ? 回答1: It is not possible. If you search keys in Eclipse's Preferences , you will find out that you only have Scroll up and Scroll down that you can set hotkeys on. My recommendation would be changing the maximum line length in the editor. Make your code shorter. After all, looooong lines of code are not so readable. Also, resize your editor area. If you

Clean up file names in Visual Studio's tabbed document interface?

£可爱£侵袭症+ 提交于 2019-12-23 10:59:37
问题 Inside a visual studio project I have the following folders (for example) foo/ bar/ LongFolderName/ When I open up a file in LongFolderName/ the tab gets labeled with LongFolderName/L...me.ascx when I'd prefer LongFileName.ascx (omitting the name of the folder). Any way to set Visual Studio to ignore the folder name when labeling the tab? EDIT: here is what my tab bar looks like: http://img355.imageshack.us/img355/7040/tabsmn7.png Notice how the names of my files are truncated past

No syntax highlighting in eclipse for java

心已入冬 提交于 2019-12-23 09:36:55
问题 There is no syntax highlighting in java files in my eclipse..This happened all of a sudden..Not sure why.. This is how it is looking now.. As mentioned in other posts..i tried to change the color from preferences window and there is nothing when i type java..something really messed up... AAny suggestions.. Update: It seems Java plugin is not installed..as per the below screeenshot And when i try to install java plugin it says new version is already installed as per the below screenshot 回答1:

How to get a flat XML so that external entities are merged to the top level

三世轮回 提交于 2019-12-23 09:23:05
问题 I know this is a borderline case whether it really belongs to stackoverflow or superuser, but as it seems there are quite a few 'editing code' questions over here, I am posting it on SO. I have a pile of XML files that someone in their infinite wisdom have decided to explode to a multiple files using the tags, which in result makes debugging/editing them a huge P-i-t-A. Therefore I am looking for: A way in VIM to open them in a single buffer (preferably so that the changes are saved in