diff options
Diffstat (limited to 'examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemRevisionEditorInput.java')
-rw-r--r-- | examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemRevisionEditorInput.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemRevisionEditorInput.java b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemRevisionEditorInput.java index 41757a4d6..bb915bd80 100644 --- a/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemRevisionEditorInput.java +++ b/examples/org.eclipse.team.examples.filesystem/src/org/eclipse/team/examples/filesystem/ui/FileSystemRevisionEditorInput.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2006, 2009 IBM Corporation and others. + * Copyright (c) 2006, 2018 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 @@ -93,15 +93,15 @@ public class FileSystemRevisionEditorInput extends PlatformObject implements IWo return ""; //$NON-NLS-1$ } - public Object getAdapter(Class adapter) { + public <T> T getAdapter(Class<T> adapter) { if (adapter == IWorkbenchAdapter.class) { - return this; + return adapter.cast(this); } if (adapter == IFileRevision.class) - return fileRevision; + return adapter.cast(fileRevision); else if (adapter == IFileState.class){ if (storage != null && storage instanceof IFileState) - return storage; + return adapter.cast(storage); } return super.getAdapter(adapter); } |