Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » LinkedPosition iteration not working in e4 application
LinkedPosition iteration not working in e4 application [message #1718233] Mon, 21 December 2015 13:26 Go to next message
Mihael Schmidt is currently offline Mihael SchmidtFriend
Messages: 81
Registered: August 2010
Member
Hi,

I have a pure e4 application and am using the SourceViewer class as an editor. I have added a KeyBinding on TAB key for shifting code to the right.

Now I also want to use LinkedPosition(s) to edit text simultaneously at multiple places in my document. But on pressing tab the editor does not iterate through the LinkedPositions but does a shift.

How can i change/fix that?

Thanx for any help in advance.

Mihael
Re: LinkedPosition iteration not working in e4 application [message #1718253 is a reply to message #1718233] Mon, 21 December 2015 18:41 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 876
Registered: January 2012
Senior Member

I am a mere neophyte with Platform/Text, but I guess hazard that you haven't associated your LinkedPositions with a position updater?

Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Re: LinkedPosition iteration not working in e4 application [message #1718256 is a reply to message #1718253] Mon, 21 December 2015 20:28 Go to previous messageGo to next message
Mihael Schmidt is currently offline Mihael SchmidtFriend
Messages: 81
Registered: August 2010
Member
I am already adding an InclusivePositionUpdater.

updater = new InclusivePositionUpdater(getCategory());
document.addPositionUpdater(updater);

Any further idea?

Thanx in advance.

Mihael

[Updated on: Mon, 21 December 2015 20:31]

Report message to a moderator

Re: LinkedPosition iteration not working in e4 application [message #1718257 is a reply to message #1718256] Mon, 21 December 2015 20:41 Go to previous messageGo to next message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 876
Registered: January 2012
Senior Member

You'll either need to post your code or (better yet) post a simple example demonstrating your problem.

Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Re: LinkedPosition iteration not working in e4 application [message #1718285 is a reply to message #1718257] Tue, 22 December 2015 06:53 Go to previous messageGo to next message
Mihael Schmidt is currently offline Mihael SchmidtFriend
Messages: 81
Registered: August 2010
Member
If i return false from my canExecute() method in my ShiftHandler the tabbing through the linked positions is working. So my handler eats the key event for the linked positions iteration.

Is there a way where to know if my viewer/document is in linkedmode?
Re: LinkedPosition iteration not working in e4 application [message #1718291 is a reply to message #1718285] Tue, 22 December 2015 07:51 Go to previous message
Mihael Schmidt is currently offline Mihael SchmidtFriend
Messages: 81
Registered: August 2010
Member
My workaround is to check in my ShiftHandler if the document has the position category is set during my linked position usage.
Previous Topic:JUnit Plug-in testing
Next Topic:CSS is not working after migrated to RCP 4
Goto Forum:
  


Current Time: Wed Oct 21 13:38:28 GMT 2020

Powered by FUDForum. Page generated in 0.02045 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top