Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 265269 - ServiceTypeID to EMF URI conversion broken
Summary: ServiceTypeID to EMF URI conversion broken
Status: RESOLVED FIXED
Alias: None
Product: ECF
Classification: RT
Component: ecf.discovery (show other bugs)
Version: 3.0.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Markus Kuppe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-18 04:29 EST by Christian Ernst CLA
Modified: 2009-02-18 04:59 EST (History)
1 user (show)

See Also:


Attachments
Simplest patch to not use a regex (1.05 KB, patch)
2009-02-18 04:31 EST, Christian Ernst CLA
bugs.eclipse.org: iplog+
Details | Diff
mylyn/context/zip (1.09 KB, application/octet-stream)
2009-02-18 04:59 EST, Markus Kuppe CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Ernst CLA 2009-02-18 04:29:46 EST
Hi !

In the class org.eclipse.ecf.discovery.ui.model.resource.ServiceResource
the conversion of ServiceTypeID to EMF URI is broken.
A ServiceTypeID like 
'odbms._vodagent._rmi.default._versant'
is now converted to
'ecf://odbms/vodagent/rmi.default/versant'
instead of
'ecf://odbms/vodagent/rmi/default/versant'

This seems to come from changing the 'org.eclipse.ecf.discovery.ui.model' plugin to CDC-1.1/Foundation-1.1,J2SE-1.4
For that change the java.lang.String.replaceFirst(..) and java.lang.String.replaceAll(..)
has been replaced by the 
org.eclipse.ecf.core.util.StringUtils.replaceFirst(..) and org.eclipse.ecf.core.util.StringUtils.replaceAll(..)

But is seems that these Methods doesn't support regex, which are used here in ServiceResource.

Attached is the simplest solution by changing ServiceResource to not use a regex. ( the regex was originaly required because '.' is a key for regex, so it had to be quoted)
Comment 1 Christian Ernst CLA 2009-02-18 04:31:02 EST
Created attachment 126000 [details]
Simplest patch to not use a regex
Comment 2 Markus Kuppe CLA 2009-02-18 04:59:05 EST
Fixed in HEAD, thanks Christian.
Comment 3 Markus Kuppe CLA 2009-02-18 04:59:07 EST
Created attachment 126004 [details]
mylyn/context/zip