Lines 92-102
Link Here
|
92 |
public static final String TAG_COMBINE_ACCESS_RULES = "combineaccessrules"; //$NON-NLS-1$ |
92 |
public static final String TAG_COMBINE_ACCESS_RULES = "combineaccessrules"; //$NON-NLS-1$ |
93 |
public static final String TAG_ACCESS_RULES = "accessrules"; //$NON-NLS-1$ |
93 |
public static final String TAG_ACCESS_RULES = "accessrules"; //$NON-NLS-1$ |
94 |
public static final String TAG_ACCESS_RULE = "accessrule"; //$NON-NLS-1$ |
94 |
public static final String TAG_ACCESS_RULE = "accessrule"; //$NON-NLS-1$ |
|
|
95 |
public static final String TAG_REFERENCES = "references"; //$NON-NLS-1$ |
96 |
public static final String TAG_REFERENCE = "reference"; //$NON-NLS-1$ |
95 |
public static final String TAG_PATTERN = "pattern"; //$NON-NLS-1$ |
97 |
public static final String TAG_PATTERN = "pattern"; //$NON-NLS-1$ |
96 |
public static final String TAG_ACCESSIBLE = "accessible"; //$NON-NLS-1$ |
98 |
public static final String TAG_ACCESSIBLE = "accessible"; //$NON-NLS-1$ |
97 |
public static final String TAG_NON_ACCESSIBLE = "nonaccessible"; //$NON-NLS-1$ |
99 |
public static final String TAG_NON_ACCESSIBLE = "nonaccessible"; //$NON-NLS-1$ |
98 |
public static final String TAG_DISCOURAGED = "discouraged"; //$NON-NLS-1$ |
100 |
public static final String TAG_DISCOURAGED = "discouraged"; //$NON-NLS-1$ |
99 |
public static final String TAG_IGNORE_IF_BETTER = "ignoreifbetter"; //$NON-NLS-1$ |
101 |
public static final String TAG_IGNORE_IF_BETTER = "ignoreifbetter"; //$NON-NLS-1$ |
|
|
102 |
public static final String TAG_EXCLUDE_CHAINED = "excludechained"; //$NON-NLS-1$ |
100 |
|
103 |
|
101 |
/** |
104 |
/** |
102 |
* Describes the kind of classpath entry - one of |
105 |
* Describes the kind of classpath entry - one of |
Lines 141-147
Link Here
|
141 |
private IPath[] exclusionPatterns; |
144 |
private IPath[] exclusionPatterns; |
142 |
private char[][] fullExclusionPatternChars; |
145 |
private char[][] fullExclusionPatternChars; |
143 |
private final static char[][] UNINIT_PATTERNS = new char[][] { "Non-initialized yet".toCharArray() }; //$NON-NLS-1$ |
146 |
private final static char[][] UNINIT_PATTERNS = new char[][] { "Non-initialized yet".toCharArray() }; //$NON-NLS-1$ |
144 |
private final static ClasspathEntry[] NO_ENTRIES = new ClasspathEntry[0]; |
147 |
public final static ClasspathEntry[] NO_ENTRIES = new ClasspathEntry[0]; |
145 |
private final static IPath[] NO_PATHS = new IPath[0]; |
148 |
private final static IPath[] NO_PATHS = new IPath[0]; |
146 |
private final static IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); |
149 |
private final static IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); |
147 |
|
150 |
|
Lines 197-202
Link Here
|
197 |
* a non-<code>null</code> value. |
200 |
* a non-<code>null</code> value. |
198 |
*/ |
201 |
*/ |
199 |
public IPath sourceAttachmentRootPath; |
202 |
public IPath sourceAttachmentRootPath; |
|
|
203 |
|
204 |
public IClasspathEntry[] chainedEntries; |
205 |
|
206 |
public IClasspathEntry referencingEntry; |
207 |
|
208 |
public boolean excludeChainedJars = false; |
209 |
|
200 |
|
210 |
|
201 |
/** |
211 |
/** |
202 |
* Specific output location (for this source entry) |
212 |
* Specific output location (for this source entry) |
Lines 220-225
Link Here
|
220 |
*/ |
230 |
*/ |
221 |
IClasspathAttribute[] extraAttributes; |
231 |
IClasspathAttribute[] extraAttributes; |
222 |
|
232 |
|
|
|
233 |
public ClasspathEntry( |
234 |
int contentKind, |
235 |
int entryKind, |
236 |
IPath path, |
237 |
IPath[] inclusionPatterns, |
238 |
IPath[] exclusionPatterns, |
239 |
IPath sourceAttachmentPath, |
240 |
IPath sourceAttachmentRootPath, |
241 |
IPath specificOutputLocation, |
242 |
boolean isExported, |
243 |
IAccessRule[] accessRules, |
244 |
boolean combineAccessRules, |
245 |
IClasspathAttribute[] extraAttributes) { |
246 |
|
247 |
this( contentKind, |
248 |
entryKind, |
249 |
path, |
250 |
inclusionPatterns, |
251 |
exclusionPatterns, |
252 |
sourceAttachmentPath, |
253 |
sourceAttachmentRootPath, |
254 |
specificOutputLocation, |
255 |
null, |
256 |
null, |
257 |
false, |
258 |
isExported, |
259 |
accessRules, |
260 |
combineAccessRules, |
261 |
extraAttributes); |
262 |
} |
263 |
|
223 |
/** |
264 |
/** |
224 |
* Creates a class path entry of the specified kind with the given path. |
265 |
* Creates a class path entry of the specified kind with the given path. |
225 |
*/ |
266 |
*/ |
Lines 232-237
Link Here
|
232 |
IPath sourceAttachmentPath, |
273 |
IPath sourceAttachmentPath, |
233 |
IPath sourceAttachmentRootPath, |
274 |
IPath sourceAttachmentRootPath, |
234 |
IPath specificOutputLocation, |
275 |
IPath specificOutputLocation, |
|
|
276 |
IClasspathEntry referencingEntry, |
277 |
IClasspathEntry[] chainedEntries, |
278 |
boolean excludeChainedJars, |
235 |
boolean isExported, |
279 |
boolean isExported, |
236 |
IAccessRule[] accessRules, |
280 |
IAccessRule[] accessRules, |
237 |
boolean combineAccessRules, |
281 |
boolean combineAccessRules, |
Lines 242-248
Link Here
|
242 |
this.path = path; |
286 |
this.path = path; |
243 |
this.inclusionPatterns = inclusionPatterns; |
287 |
this.inclusionPatterns = inclusionPatterns; |
244 |
this.exclusionPatterns = exclusionPatterns; |
288 |
this.exclusionPatterns = exclusionPatterns; |
245 |
|
289 |
this.referencingEntry = referencingEntry; |
|
|
290 |
this.excludeChainedJars = excludeChainedJars; |
291 |
this.chainedEntries = chainedEntries; |
292 |
|
246 |
int length; |
293 |
int length; |
247 |
if (accessRules != null && (length = accessRules.length) > 0) { |
294 |
if (accessRules != null && (length = accessRules.length) > 0) { |
248 |
AccessRule[] rules = new AccessRule[length]; |
295 |
AccessRule[] rules = new AccessRule[length]; |
Lines 379-384
Link Here
|
379 |
System.arraycopy(result, 0, result = new IAccessRule[index], 0, index); |
426 |
System.arraycopy(result, 0, result = new IAccessRule[index], 0, index); |
380 |
return result; |
427 |
return result; |
381 |
} |
428 |
} |
|
|
429 |
|
430 |
static IClasspathEntry[] decodeReferences(NodeList list, IClasspathEntry parent) { |
431 |
if (list == null) return null; |
432 |
int length = list.getLength(); |
433 |
if (length == 0) return null; |
434 |
IClasspathEntry[] result = new IClasspathEntry[length]; |
435 |
int index = 0; |
436 |
for (int i = 0; i < length; i++) { |
437 |
Node referencedEntry = list.item(i); |
438 |
if (referencedEntry.getNodeType() == Node.ELEMENT_NODE) { |
439 |
Element elementReference = (Element) referencedEntry; |
440 |
String path = elementReference.getAttribute(TAG_PATH); |
441 |
String sourceAttachment = elementReference.getAttribute(TAG_SOURCEPATH); |
442 |
String sourceRoot = elementReference.getAttribute(TAG_ROOTPATH); |
443 |
result[index++] = |
444 |
new ClasspathEntry( |
445 |
parent.getContentKind(), |
446 |
parent.getEntryKind(), |
447 |
new Path(path), |
448 |
parent.getInclusionPatterns(), |
449 |
parent.getExclusionPatterns(), |
450 |
"".equals(sourceAttachment) ? null : new Path(sourceAttachment), //$NON-NLS-1$ |
451 |
"".equals(sourceRoot) ? null : new Path(sourceRoot), //$NON-NLS-1$ |
452 |
parent.getOutputLocation(), |
453 |
parent, |
454 |
new IClasspathEntry[0], |
455 |
parent.excludeChainedJars(), |
456 |
parent.isExported(), |
457 |
parent.getAccessRules(), |
458 |
parent.combineAccessRules(), |
459 |
parent.getExtraAttributes()); |
460 |
} |
461 |
} |
462 |
if (index != length) |
463 |
System.arraycopy(result, 0, result = new ClasspathEntry[index], 0, index); |
464 |
return result; |
465 |
} |
382 |
|
466 |
|
383 |
/** |
467 |
/** |
384 |
* Decode some element tag containing a sequence of patterns into IPath[] |
468 |
* Decode some element tag containing a sequence of patterns into IPath[] |
Lines 494-529
Link Here
|
494 |
|
578 |
|
495 |
parameters.put(TAG_KIND, ClasspathEntry.kindToString(this.entryKind)); |
579 |
parameters.put(TAG_KIND, ClasspathEntry.kindToString(this.entryKind)); |
496 |
|
580 |
|
497 |
IPath xmlPath = this.path; |
581 |
encodePathAttributes(projectPath, parameters); |
498 |
if (this.entryKind != IClasspathEntry.CPE_VARIABLE && this.entryKind != IClasspathEntry.CPE_CONTAINER) { |
582 |
|
499 |
// translate to project relative from absolute (unless a device path) |
583 |
if (this.entryKind == IClasspathEntry.CPE_LIBRARY) { |
500 |
if (xmlPath.isAbsolute()) { |
584 |
if (this.excludeChainedJars) { |
501 |
if (projectPath != null && projectPath.isPrefixOf(xmlPath)) { |
585 |
parameters.put(TAG_EXCLUDE_CHAINED, "true"); //$NON-NLS-1$ |
502 |
if (xmlPath.segment(0).equals(projectPath.segment(0))) { |
|
|
503 |
xmlPath = xmlPath.removeFirstSegments(1); |
504 |
xmlPath = xmlPath.makeRelative(); |
505 |
} else { |
506 |
xmlPath = xmlPath.makeAbsolute(); |
507 |
} |
508 |
} |
509 |
} |
586 |
} |
510 |
} |
587 |
} |
511 |
parameters.put(TAG_PATH, String.valueOf(xmlPath)); |
|
|
512 |
|
513 |
if (this.sourceAttachmentPath != null) { |
514 |
xmlPath = this.sourceAttachmentPath; |
515 |
// translate to project relative from absolute |
516 |
if (this.entryKind != IClasspathEntry.CPE_VARIABLE && projectPath != null && projectPath.isPrefixOf(xmlPath)) { |
517 |
if (xmlPath.segment(0).equals(projectPath.segment(0))) { |
518 |
xmlPath = xmlPath.removeFirstSegments(1); |
519 |
xmlPath = xmlPath.makeRelative(); |
520 |
} |
521 |
} |
522 |
parameters.put(TAG_SOURCEPATH, String.valueOf(xmlPath)); |
523 |
} |
524 |
if (this.sourceAttachmentRootPath != null) { |
525 |
parameters.put(TAG_ROOTPATH, String.valueOf(this.sourceAttachmentRootPath)); |
526 |
} |
527 |
if (this.isExported) { |
588 |
if (this.isExported) { |
528 |
parameters.put(TAG_EXPORTED, "true");//$NON-NLS-1$ |
589 |
parameters.put(TAG_EXPORTED, "true");//$NON-NLS-1$ |
529 |
} |
590 |
} |
Lines 553-564
Link Here
|
553 |
boolean hasRestrictions = getAccessRuleSet() != null; // access rule set is null if no access rules |
614 |
boolean hasRestrictions = getAccessRuleSet() != null; // access rule set is null if no access rules |
554 |
ArrayList unknownChildren = unknownXmlElements != null ? unknownXmlElements.children : null; |
615 |
ArrayList unknownChildren = unknownXmlElements != null ? unknownXmlElements.children : null; |
555 |
boolean hasUnknownChildren = unknownChildren != null; |
616 |
boolean hasUnknownChildren = unknownChildren != null; |
|
|
617 |
boolean hasChainedEntries = getChainedEntries().length > 0 ? true : false; |
618 |
|
619 |
/* close tag if no extra attributes, no restriction, no unknown children and no chained classpath entries */ |
556 |
writer.printTag( |
620 |
writer.printTag( |
557 |
TAG_CLASSPATHENTRY, |
621 |
TAG_CLASSPATHENTRY, |
558 |
parameters, |
622 |
parameters, |
559 |
indent, |
623 |
indent, |
560 |
newLine, |
624 |
newLine, |
561 |
!hasExtraAttributes && !hasRestrictions && !hasUnknownChildren/*close tag if no extra attributes, no restriction and no unknown children*/); |
625 |
!hasExtraAttributes && !hasRestrictions && !hasUnknownChildren && !hasChainedEntries); |
562 |
|
626 |
|
563 |
if (hasExtraAttributes) |
627 |
if (hasExtraAttributes) |
564 |
encodeExtraAttributes(writer, indent, newLine); |
628 |
encodeExtraAttributes(writer, indent, newLine); |
Lines 566-578
Link Here
|
566 |
if (hasRestrictions) |
630 |
if (hasRestrictions) |
567 |
encodeAccessRules(writer, indent, newLine); |
631 |
encodeAccessRules(writer, indent, newLine); |
568 |
|
632 |
|
|
|
633 |
if (this.getChainedEntries().length > 0) { |
634 |
encodeReferences(writer, projectPath, indent, newLine); |
635 |
} |
569 |
if (hasUnknownChildren) |
636 |
if (hasUnknownChildren) |
570 |
encodeUnknownChildren(writer, indent, newLine, unknownChildren); |
637 |
encodeUnknownChildren(writer, indent, newLine, unknownChildren); |
571 |
|
638 |
|
572 |
if (hasExtraAttributes || hasRestrictions || hasUnknownChildren) |
639 |
if (hasExtraAttributes || hasRestrictions || hasUnknownChildren || hasChainedEntries) |
573 |
writer.endTag(TAG_CLASSPATHENTRY, indent, true/*insert new line*/); |
640 |
writer.endTag(TAG_CLASSPATHENTRY, indent, true/*insert new line*/); |
574 |
} |
641 |
} |
575 |
|
642 |
|
|
|
643 |
private void encodePathAttributes(IPath projectPath, HashMap parameters) { |
644 |
IPath xmlPath = this.path; |
645 |
if (this.entryKind != IClasspathEntry.CPE_VARIABLE && this.entryKind != IClasspathEntry.CPE_CONTAINER) { |
646 |
// translate to project relative from absolute (unless a device path) |
647 |
if (xmlPath.isAbsolute()) { |
648 |
if (projectPath != null && projectPath.isPrefixOf(xmlPath)) { |
649 |
if (xmlPath.segment(0).equals(projectPath.segment(0))) { |
650 |
xmlPath = xmlPath.removeFirstSegments(1); |
651 |
xmlPath = xmlPath.makeRelative(); |
652 |
} else { |
653 |
xmlPath = xmlPath.makeAbsolute(); |
654 |
} |
655 |
} |
656 |
} |
657 |
} |
658 |
parameters.put(TAG_PATH, String.valueOf(xmlPath)); |
659 |
|
660 |
if (this.sourceAttachmentPath != null) { |
661 |
xmlPath = this.sourceAttachmentPath; |
662 |
// translate to project relative from absolute |
663 |
if (this.entryKind != IClasspathEntry.CPE_VARIABLE && projectPath != null && projectPath.isPrefixOf(xmlPath)) { |
664 |
if (xmlPath.segment(0).equals(projectPath.segment(0))) { |
665 |
xmlPath = xmlPath.removeFirstSegments(1); |
666 |
xmlPath = xmlPath.makeRelative(); |
667 |
} |
668 |
} |
669 |
parameters.put(TAG_SOURCEPATH, String.valueOf(xmlPath)); |
670 |
} |
671 |
if (this.sourceAttachmentRootPath != null) { |
672 |
parameters.put(TAG_ROOTPATH, String.valueOf(this.sourceAttachmentRootPath)); |
673 |
} |
674 |
} |
675 |
|
576 |
void encodeExtraAttributes(XMLWriter writer, boolean indent, boolean newLine) { |
676 |
void encodeExtraAttributes(XMLWriter writer, boolean indent, boolean newLine) { |
577 |
writer.startTag(TAG_ATTRIBUTES, indent); |
677 |
writer.startTag(TAG_ATTRIBUTES, indent); |
578 |
for (int i = 0; i < this.extraAttributes.length; i++) { |
678 |
for (int i = 0; i < this.extraAttributes.length; i++) { |
Lines 617-622
Link Here
|
617 |
writer.printTag(TAG_ACCESS_RULE, parameters, indent, newLine, true); |
717 |
writer.printTag(TAG_ACCESS_RULE, parameters, indent, newLine, true); |
618 |
|
718 |
|
619 |
} |
719 |
} |
|
|
720 |
|
721 |
void encodeReferences(XMLWriter writer, IPath projectPath, boolean indent, boolean newLine) { |
722 |
writer.startTag(TAG_REFERENCES, indent); |
723 |
IClasspathEntry[] references = getChainedEntries(); |
724 |
for (int index = 0, length = references.length; index < length; index++) { |
725 |
HashMap parameters = new HashMap(3); |
726 |
|
727 |
((ClasspathEntry)references[index]).encodePathAttributes(projectPath, parameters); |
728 |
writer.printTag(TAG_REFERENCE, parameters, indent, newLine, true); |
729 |
} |
730 |
writer.endTag(TAG_REFERENCES, indent, true/*insert new line*/); |
731 |
} |
620 |
|
732 |
|
621 |
private void encodeUnknownChildren(XMLWriter writer, boolean indent, boolean newLine, ArrayList unknownChildren) { |
733 |
private void encodeUnknownChildren(XMLWriter writer, boolean indent, boolean newLine, ArrayList unknownChildren) { |
622 |
for (int i = 0, length = unknownChildren.size(); i < length; i++) { |
734 |
for (int i = 0, length = unknownChildren.size(); i < length; i++) { |
Lines 657-663
Link Here
|
657 |
|
769 |
|
658 |
// exported flag (optional) |
770 |
// exported flag (optional) |
659 |
boolean isExported = removeAttribute(TAG_EXPORTED, attributes).equals("true"); //$NON-NLS-1$ |
771 |
boolean isExported = removeAttribute(TAG_EXPORTED, attributes).equals("true"); //$NON-NLS-1$ |
660 |
|
772 |
boolean excludeChained = removeAttribute(TAG_EXCLUDE_CHAINED, attributes).equals("true"); //$NON-NLS-1$ |
|
|
773 |
|
661 |
// inclusion patterns (optional) |
774 |
// inclusion patterns (optional) |
662 |
IPath[] inclusionPatterns = decodePatterns(attributes, TAG_INCLUDING); |
775 |
IPath[] inclusionPatterns = decodePatterns(attributes, TAG_INCLUDING); |
663 |
if (inclusionPatterns == null) inclusionPatterns = INCLUDE_ALL; |
776 |
if (inclusionPatterns == null) inclusionPatterns = INCLUDE_ALL; |
Lines 685-719
Link Here
|
685 |
// custom output location |
798 |
// custom output location |
686 |
IPath outputLocation = element.hasAttribute(TAG_OUTPUT) ? projectPath.append(removeAttribute(TAG_OUTPUT, attributes)) : null; |
799 |
IPath outputLocation = element.hasAttribute(TAG_OUTPUT) ? projectPath.append(removeAttribute(TAG_OUTPUT, attributes)) : null; |
687 |
|
800 |
|
688 |
String[] unknownAttributes = null; |
|
|
689 |
ArrayList unknownChildren = null; |
690 |
|
691 |
if (unknownElements != null) { |
692 |
// unknown attributes |
693 |
int unknownAttributeLength = attributes.getLength(); |
694 |
if (unknownAttributeLength != 0) { |
695 |
unknownAttributes = new String[unknownAttributeLength*2]; |
696 |
for (int i = 0; i < unknownAttributeLength; i++) { |
697 |
Node attribute = attributes.item(i); |
698 |
unknownAttributes[i*2] = attribute.getNodeName(); |
699 |
unknownAttributes[i*2 + 1] = attribute.getNodeValue(); |
700 |
} |
701 |
} |
702 |
|
703 |
// unknown children |
704 |
for (int i = 0, length = foundChildren.length; i < length; i++) { |
705 |
if (!foundChildren[i]) { |
706 |
Node node = children.item(i); |
707 |
if (node.getNodeType() != Node.ELEMENT_NODE) continue; |
708 |
if (unknownChildren == null) |
709 |
unknownChildren = new ArrayList(); |
710 |
StringBuffer buffer = new StringBuffer(); |
711 |
decodeUnknownNode(node, buffer, project); |
712 |
unknownChildren.add(buffer.toString()); |
713 |
} |
714 |
} |
715 |
} |
716 |
|
717 |
// recreate the CP entry |
801 |
// recreate the CP entry |
718 |
IClasspathEntry entry = null; |
802 |
IClasspathEntry entry = null; |
719 |
switch (kind) { |
803 |
switch (kind) { |
Lines 738-746
Link Here
|
738 |
path, |
822 |
path, |
739 |
sourceAttachmentPath, |
823 |
sourceAttachmentPath, |
740 |
sourceAttachmentRootPath, |
824 |
sourceAttachmentRootPath, |
|
|
825 |
null, |
826 |
excludeChained, |
741 |
accessRules, |
827 |
accessRules, |
742 |
extraAttributes, |
828 |
extraAttributes, |
743 |
isExported); |
829 |
isExported); |
|
|
830 |
NodeList referencesList = getChildAttributes(TAG_REFERENCES, children, foundChildren); |
831 |
IClasspathEntry[] references = decodeReferences(referencesList, entry); |
832 |
((ClasspathEntry)entry).setReferencedEntries(references); |
744 |
break; |
833 |
break; |
745 |
case IClasspathEntry.CPE_SOURCE : |
834 |
case IClasspathEntry.CPE_SOURCE : |
746 |
// must be an entry in this project or specify another project |
835 |
// must be an entry in this project or specify another project |
Lines 807-812
Link Here
|
807 |
default : |
896 |
default : |
808 |
throw new AssertionFailedException(Messages.bind(Messages.classpath_unknownKind, kindAttr)); |
897 |
throw new AssertionFailedException(Messages.bind(Messages.classpath_unknownKind, kindAttr)); |
809 |
} |
898 |
} |
|
|
899 |
|
900 |
String[] unknownAttributes = null; |
901 |
ArrayList unknownChildren = null; |
902 |
|
903 |
if (unknownElements != null) { |
904 |
// unknown attributes |
905 |
int unknownAttributeLength = attributes.getLength(); |
906 |
if (unknownAttributeLength != 0) { |
907 |
unknownAttributes = new String[unknownAttributeLength*2]; |
908 |
for (int i = 0; i < unknownAttributeLength; i++) { |
909 |
Node attribute = attributes.item(i); |
910 |
unknownAttributes[i*2] = attribute.getNodeName(); |
911 |
unknownAttributes[i*2 + 1] = attribute.getNodeValue(); |
912 |
} |
913 |
} |
914 |
|
915 |
// unknown children |
916 |
for (int i = 0, length = foundChildren.length; i < length; i++) { |
917 |
if (!foundChildren[i]) { |
918 |
Node node = children.item(i); |
919 |
if (node.getNodeType() != Node.ELEMENT_NODE) continue; |
920 |
if (unknownChildren == null) |
921 |
unknownChildren = new ArrayList(); |
922 |
StringBuffer buffer = new StringBuffer(); |
923 |
decodeUnknownNode(node, buffer, project); |
924 |
unknownChildren.add(buffer.toString()); |
925 |
} |
926 |
} |
927 |
} |
810 |
|
928 |
|
811 |
if (unknownAttributes != null || unknownChildren != null) { |
929 |
if (unknownAttributes != null || unknownChildren != null) { |
812 |
UnknownXmlElements unknownXmlElements = new UnknownXmlElements(); |
930 |
UnknownXmlElements unknownXmlElements = new UnknownXmlElements(); |
Lines 1019-1024
Link Here
|
1019 |
if (this.entryKind != otherEntry.getEntryKind()) |
1137 |
if (this.entryKind != otherEntry.getEntryKind()) |
1020 |
return false; |
1138 |
return false; |
1021 |
|
1139 |
|
|
|
1140 |
if (this.excludeChainedJars != otherEntry.excludeChainedJars()) |
1141 |
return false; |
1142 |
|
1022 |
if (this.isExported != otherEntry.isExported()) |
1143 |
if (this.isExported != otherEntry.isExported()) |
1023 |
return false; |
1144 |
return false; |
1024 |
|
1145 |
|
Lines 1178-1183
Link Here
|
1178 |
return this.sourceAttachmentRootPath; |
1299 |
return this.sourceAttachmentRootPath; |
1179 |
} |
1300 |
} |
1180 |
|
1301 |
|
|
|
1302 |
|
1303 |
public boolean excludeChainedJars() { |
1304 |
return this.excludeChainedJars; |
1305 |
} |
1306 |
|
1307 |
public IClasspathEntry getReferencingEntry() { |
1308 |
return this.referencingEntry; |
1309 |
} |
1310 |
|
1311 |
public IClasspathEntry[] getChainedEntries() { |
1312 |
if (this.chainedEntries == null) { |
1313 |
return new IClasspathEntry[0]; |
1314 |
} |
1315 |
return this.chainedEntries; |
1316 |
} |
1317 |
|
1318 |
public void setReferencedEntries(IClasspathEntry[] entries) { |
1319 |
this.chainedEntries = entries; |
1320 |
} |
1321 |
|
1181 |
/** |
1322 |
/** |
1182 |
* Returns the hash code for this classpath entry |
1323 |
* Returns the hash code for this classpath entry |
1183 |
*/ |
1324 |
*/ |
Lines 1380-1385
Link Here
|
1380 |
getSourceAttachmentPath(), |
1521 |
getSourceAttachmentPath(), |
1381 |
getSourceAttachmentRootPath(), |
1522 |
getSourceAttachmentRootPath(), |
1382 |
getOutputLocation(), |
1523 |
getOutputLocation(), |
|
|
1524 |
this.getReferencingEntry(), |
1525 |
this.getChainedEntries(), |
1526 |
this.excludeChainedJars(), |
1383 |
this.isExported, |
1527 |
this.isExported, |
1384 |
getAccessRules(), |
1528 |
getAccessRules(), |
1385 |
this.combineAccessRules, |
1529 |
this.combineAccessRules, |
Lines 1397-1415
Link Here
|
1397 |
return NO_ENTRIES; |
1541 |
return NO_ENTRIES; |
1398 |
ClasspathEntry[] result = new ClasspathEntry[length]; |
1542 |
ClasspathEntry[] result = new ClasspathEntry[length]; |
1399 |
for (int i = 0; i < length; i++) { |
1543 |
for (int i = 0; i < length; i++) { |
|
|
1544 |
//TODO: Consider a new constructor that doesn't require chainedEntries as param. |
1400 |
result[i] = new ClasspathEntry( |
1545 |
result[i] = new ClasspathEntry( |
1401 |
getContentKind(), |
1546 |
getContentKind(), |
1402 |
getEntryKind(), |
1547 |
getEntryKind(), |
1403 |
paths[i], |
1548 |
paths[i], |
1404 |
this.inclusionPatterns, |
1549 |
this.inclusionPatterns, |
1405 |
this.exclusionPatterns, |
1550 |
this.exclusionPatterns, |
1406 |
getSourceAttachmentPath(), |
1551 |
null, |
1407 |
getSourceAttachmentRootPath(), |
1552 |
null, |
1408 |
getOutputLocation(), |
1553 |
getOutputLocation(), |
1409 |
this.isExported, |
1554 |
this, |
1410 |
getAccessRules(), |
1555 |
null, |
1411 |
this.combineAccessRules, |
1556 |
false, |
1412 |
this.extraAttributes); |
1557 |
this.isExported, |
|
|
1558 |
getAccessRules(), |
1559 |
this.combineAccessRules, |
1560 |
this.extraAttributes); |
1413 |
} |
1561 |
} |
1414 |
return result; |
1562 |
return result; |
1415 |
} |
1563 |
} |