Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2010 itemis AG (http://www.itemis.eu) 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 /
 
 package org.eclipse.xtext.ui.label;
 
import  org.eclipse.core.runtime.CoreException;
import  org.eclipse.emf.common.ui.URIEditorInput;
import  org.eclipse.jface.resource.ImageDescriptor;
import  org.eclipse.ui.IStorageEditorInput;

Author(s):
Jan Koehnlein - Initial contribution and API
	private static final Logger LOG = Logger.getLogger(DefaultEditorInputLabelProvider.class);
	public String text(IStorageEditorInput editorInput) {
		try {
			return editorInput.getStorage().getFullPath().lastSegment();
catch (CoreException e) {
			.error("Error resolving IStorage from IStorageEditorInput"e);
		}
		return null;
	}
	public String text(URIEditorInput editorInput) {
		return editorInput.getURI().lastSegment();
	}
	public ImageDescriptor image(IStorageEditorInput editorInput) {
	}
	public ImageDescriptor image(URIEditorInput editorInput) {
	}
New to GrepCode? Check out our FAQ X