Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 40492 Details for
Bug 135180
Can't use jdt with MANAGED-ONLY policy
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
regex based parser for symbolic name, version
FullJarNameParser.java (text/plain), 2.27 KB, created by
David Williams
on 2006-05-05 11:34:57 EDT
(
hide
)
Description:
regex based parser for symbolic name, version
Filename:
MIME Type:
Creator:
David Williams
Created:
2006-05-05 11:34:57 EDT
Size:
2.27 KB
patch
obsolete
>/******************************************************************************* > * Copyright (c) 2006 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at > * http://www.eclipse.org/legal/epl-v10.html > * > * Contributors: > * IBM Corporation - initial API and implementation > * > *******************************************************************************/ > >package org.eclipse.callisto.tools.utils; > >import java.util.regex.Matcher; >import java.util.regex.Pattern; > >public class FullJarNameParser { > > private static final boolean DEBUG = false; > // simplified pattern: (ID) '_' (N '.' M '.' O '.' S) '.jar' > private String START_GROUP = "(";//$NON-NLS-1$ > private String END_GROUP = ")"; > private String UNDERSCORE = "_"; > private String BACKSLASH = "\\"; > private String LITERAL_PERIOD = BACKSLASH + "."; > private String ANYDIGITS = BACKSLASH + "d" + "*"; > private String ANY = ".*"; > private Pattern pattern = Pattern.compile(START_GROUP + ANY + END_GROUP + UNDERSCORE + START_GROUP + START_GROUP + ANYDIGITS + END_GROUP + LITERAL_PERIOD + START_GROUP + ANYDIGITS + END_GROUP + LITERAL_PERIOD + START_GROUP + ANYDIGITS + END_GROUP + START_GROUP + LITERAL_PERIOD + ANY + END_GROUP + "?" + END_GROUP + ".jar"); > > private String projectString; > private String versionString; > > > > public FullJarNameParser() { > super(); > } > > public boolean parse(String line) { > boolean result = false; > projectString = ""; > projectString = ""; > Matcher matcher = pattern.matcher(line); > > if (!matcher.matches()) { > System.out.println(); > System.out.println("\tthe line did not match parse rule: "); > System.out.println("\t" + line); > System.out.println(); > result = false; > } > else { > > projectString = matcher.group(1); > versionString = matcher.group(2); > if (DEBUG) { > System.out.println(projectString); > System.out.println(versionString); > System.out.println(); > } > result = true; > } > return result; > } > > > > public String getProjectString() { > return projectString; > } > > > > public String getVersionString() { > return versionString; > } >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 135180
:
40483
|
40486
|
40490
| 40492