Skip to content

Commit 9e1f790

Browse files
committed
Add example of extension in regular bundle
Signed-off-by: Christoph Läubrich <[email protected]>
1 parent 5ba1378 commit 9e1f790

File tree

4 files changed

+29
-1
lines changed

4 files changed

+29
-1
lines changed

org.eclipse.m2e.bnd.ui/build.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ output.. = bin/
33
bin.includes = META-INF/,\
44
.,\
55
OSGI-INF/
6+
jars.extra.classpath = platform:/plugin/org.eclipse.wildwebdeveloper.xml/language-servers/server/org.eclipse.lemminx-uber.jar
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package org.eclipse.m2e.bnd.ui.lemminx;
2+
3+
import org.eclipse.lemminx.services.extensions.IXMLExtension;
4+
import org.eclipse.lemminx.services.extensions.XMLExtensionsRegistry;
5+
import org.eclipse.lsp4j.InitializeParams;
6+
7+
public class MyExtension implements IXMLExtension {
8+
9+
@Override
10+
public void start(InitializeParams arg0, XMLExtensionsRegistry arg1) {
11+
// TODO Auto-generated method stub
12+
13+
}
14+
15+
@Override
16+
public void stop(XMLExtensionsRegistry arg0) {
17+
// TODO Auto-generated method stub
18+
19+
}
20+
21+
}

org.eclipse.m2e.core/.settings/org.eclipse.pde.ds.annotations.prefs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
classpath=true
2-
dsVersion=V1_3
2+
dsVersion=V1_5
33
eclipse.preferences.version=1
44
enabled=true
55
generateBundleActivationPolicyLazy=true

org.eclipse.m2e.lemminx.bnd/src/main/java/org/eclipse/m2e/lemminx/bnd/BndLemminxPlugin.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,26 +43,32 @@ public void start(InitializeParams params, XMLExtensionsRegistry registry) {
4343
@Override
4444
public void onAttributeName(boolean arg0, ICompletionRequest arg1, ICompletionResponse arg2,
4545
CancelChecker arg3) throws Exception {
46+
logger.log(Level.INFO, "onAttributeName");
4647
}
4748

4849
@Override
4950
public void onAttributeValue(String arg0, ICompletionRequest arg1, ICompletionResponse arg2,
5051
CancelChecker arg3) throws Exception {
52+
logger.log(Level.INFO, "onAttributeValue");
5153
}
5254

5355
@Override
5456
public void onDTDSystemId(String arg0, ICompletionRequest arg1, ICompletionResponse arg2,
5557
CancelChecker arg3) throws Exception {
58+
logger.log(Level.INFO, "onDTDSystemId");
5659
}
5760

5861
@Override
5962
public void onTagOpen(ICompletionRequest arg0, ICompletionResponse arg1, CancelChecker arg2)
6063
throws Exception {
64+
logger.log(Level.INFO, "onTagOpen");
6165
}
6266

6367
@Override
6468
public void onXMLContent(ICompletionRequest completionRequest, ICompletionResponse response,
6569
CancelChecker checker) throws Exception {
70+
71+
logger.log(Level.INFO, "onXMLContent");
6672
try {
6773
// FIXME CDATA do not trigger completion:
6874
// https://github.com/eclipse/lemminx/issues/1694

0 commit comments

Comments
 (0)