NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

setToolTipText() not working while working on NetbeansPlatformApplication

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users
View previous topic :: View next topic  
Author Message
shiavyu



Joined: 10 Jan 2017
Posts: 1
Location: Pune, India

PostPosted: Thu Jan 19, 2017 7:40 am    Post subject: setToolTipText() not working while working on NetbeansPlatformApplication Reply with quote

We are building a tool to provide assistance to the users when they manually inspect static analysis warnings generated on 'C' code. We found that NetBeans Platform provides an easy and efficient way to develop tools and it is suitable for our development of a tool that has GUI and capabilities to provide assistance to the users. Towards this end, we tried using Netbeans Editor Module where we wish to utilize the existing editor features like code highlighting and folding, syntax coloring, and displaying keywords/data types.

We intend to provide assistance messages to the users as a tool tip on the variables and operators (i.e. on mouse movement).

We tried using the following Code snippet in an independent NetbeansPlatformApplication (without including the Editor modules) to open a file in the editor and obtain the JEditorPane object.
File f = new File(<file path>);
FileObject fileObject = FileUtil.toFileObject(file);
DataObject d = DataObject.find(fileObject);
EditorCookie ec = (EditorCookie)d.getCookie(EditorCookie.class);
ec.open();
StyledDocument doc = ec.openDocument();
JEditorPane[] openedPanes = ec .getOpenedPanes();
JEditorpane editor = openedPanes[0];

And then used the setToolTipText() method on the editor object, this worked prefectly fine(with MouseMotionListener), but on trying to include C/C++ editor module(and modules which it depends on) in the NetbeansPlatformApplication we got the editor functionalities like syntax coloring, code folding, displaying keywords/datatypes. But now the ToolTip had stoped working and the tool tip behaviour is unpredictable as sometimes it would work and sometimes it won't .

We are looking for a help to understand how we can make the tool tip visible all the time on mouse movement event. Requesting help on this. Thank you very much in advance.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Platform Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo