mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-08 15:09:39 +07:00
[java] recognizes "Launcher-Agent-Class" in manifests
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -39,6 +39,7 @@ public class ClassReferenceParser extends StandardHeaderParser {
|
||||
public static final String MAIN_CLASS = "Main-Class";
|
||||
public static final String PREMAIN_CLASS = "Premain-Class";
|
||||
public static final String AGENT_CLASS = "Agent-Class";
|
||||
public static final String LAUNCHER_AGENT_CLASS = "Launcher-Agent-Class";
|
||||
|
||||
public static final HeaderParser INSTANCE = new ClassReferenceParser();
|
||||
|
||||
@@ -100,7 +101,7 @@ public class ClassReferenceParser extends StandardHeaderParser {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (header.equals(AGENT_CLASS) && !hasInstrumenterMethod(aClass, "agentmain")) {
|
||||
if ((header.equals(AGENT_CLASS) || header.equals(LAUNCHER_AGENT_CLASS)) && !hasInstrumenterMethod(aClass, "agentmain")) {
|
||||
holder.createErrorAnnotation(valuePart.getHighlightingRange(), ManifestBundle.message("header.agent.class.invalid"));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -61,6 +61,7 @@ public class StandardManifestHeaderParsers implements HeaderParserProvider {
|
||||
myParsers.put("Magic", StandardHeaderParser.INSTANCE);
|
||||
myParsers.put(ClassReferenceParser.PREMAIN_CLASS, ClassReferenceParser.INSTANCE);
|
||||
myParsers.put(ClassReferenceParser.AGENT_CLASS, ClassReferenceParser.INSTANCE);
|
||||
myParsers.put(ClassReferenceParser.LAUNCHER_AGENT_CLASS, ClassReferenceParser.INSTANCE);
|
||||
myParsers.put("Boot-Class-Path", StandardHeaderParser.INSTANCE);
|
||||
myParsers.put("Can-Redefine-Classes", StandardHeaderParser.INSTANCE);
|
||||
myParsers.put("Can-Retransform-Classes", StandardHeaderParser.INSTANCE);
|
||||
|
||||
Reference in New Issue
Block a user