My favorites
▼
|
Sign in
xtext-samples
Sample projects demonstrating some Xtext "How To"s
Project Home
Downloads
Source
Repository:
default
wiki
Checkout
Browse
Changes
Clones
Source path:
git
/
work-with-file-names
/
com.google.eclipse.xtext.filename
/
src
/
com
/
google
/
eclipse
/
xtext
/
filename
/
resource
/
URIs.java
‹46a03995f280
ba3910eee250
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
* Copyright (c) 2012 Google Inc.
*
* 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
*/
package com.google.eclipse.xtext.filename.resource;
import org.eclipse.emf.common.util.URI;
/**
* Utility methods related to <code>{@link URI}</code>s.
*
* @author alruiz@google.com (Alex Ruiz)
*/
final class URIs {
/**
* Indicates whether the given <code>{@link URI}</code> refers to a "MyDsl" file.
* @param uri the given {@code URI}. It may be {@code null}.
* @return {@code true} if the given {@code URI} belongs to a "MyDsl" file, {@code false}
* otherwise.
*/
static boolean isMyDslFile(URI uri) {
if (uri == null) return false;
String fileName = uri.lastSegment();
return "MyDsl".equals(fileName);
}
private URIs() {}
}
Show details
Hide details
Change log
ba3910eee250
by Alex Ruiz <alr...@google.com> on Jan 10, 2012
Diff
Formatting.
Go to:
...ilename/ui/InjectorProvider.java
...t/filename/ui/MyDslUiModule.java
...i/ResourceFactoryDescriptor.java
.../ui/ResourceServiceProvider.java
...text/filename/ui/XtextSetup.java
...ssist/MyDslProposalProvider.java
...DslDescriptionLabelProvider.java
...labeling/MyDslLabelProvider.java
...ne/MyDslOutlineTreeProvider.java
...ckfix/MyDslQuickfixProvider.java
...filename/MyDslRuntimeModule.java
...lename/MyDslStandaloneSetup.java
...e/formatting/MyDslFormatter.java
...esource/MyDslContentHandler.java
...yDslResourceServiceProvider.java
...text/filename/resource/URIs.java
.../scoping/MyDslScopeProvider.java
...lidation/MyDslJavaValidator.java
Project members,
sign in
to write a code review
Older revisions
46a03995f280
by Alex Ruiz <alr...@google.com> on Jan 7, 2012
Diff
Initial upload.
All revisions of this file
File info
Size: 960 bytes, 33 lines
View raw file
Powered by
Google Project Hosting