|
|
Re: Open file or project from content assist(CTRL+Space) proposals [message #1764033 is a reply to message #1763413] |
Wed, 24 May 2017 08:28 |
saravanakumar Mohanasundaram Messages: 19 Registered: February 2017 |
Junior Member |
|
|
Hello all,
This can be done by creating your own informationcontrol class which extends AbstractInformationControl
1. Override the below method in sourceviewerconfiguration
@Override
public IInformationControlCreator getInformationControlCreator(
final ISourceViewer sourceViewer) {
// TODO Auto-generated method stub
return new IInformationControlCreator() {
@Override
public IInformationControl createInformationControl(Shell parent) {
MyInformationControl iControl = new MyInformationControl(
parent);
return iControl;
}
};
}
2. Create informationcontrol class:
public class MyInformationControl extends AbstractInformationControl {
public MyInformationControl (Shell parentShell) {
super(parentShell);
create();
}
@Override
public boolean hasContents() {
// TODO Auto-generated method stub
return true;
}
private Link link;
@Override
protected void createContent(Composite parent) {
link = new Link(parent, SWT.BORDER);
link.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent event) {
// your code
}
});
}
@Override
public void setInformation(String content) {
link.setText("<a>" + content + "</a>");
}
}
Regards,
saravanakumar
[Updated on: Wed, 24 May 2017 08:33] Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04076 seconds