~ubuntu-branches/debian/sid/eclipse-cdt/sid

« back to all changes in this revision

Viewing changes to results/plugins/org.eclipse.cdt.examples.dsf/src/org/eclipse/cdt/examples/dsf/filebrowser/FileVMContext.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2011-10-06 21:15:04 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20111006211504-8dutmljjih0zikfv
Tags: 8.0.1-1
* New upstream release.
* Split the JNI packages into a separate architecture dependent
  package and made eclipse-cdt architecture independent.
* Install JNI libraries into multiarch aware location
* Bumped Standards-Version to 3.9.2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*******************************************************************************
2
 
 * Copyright (c) 2006, 2008 Wind River Systems and others.
3
 
 * All rights reserved. This program and the accompanying materials
4
 
 * are made available under the terms of the Eclipse Public License v1.0
5
 
 * which accompanies this distribution, and is available at
6
 
 * http://www.eclipse.org/legal/epl-v10.html
7
 
 * 
8
 
 * Contributors:
9
 
 *     Wind River Systems - initial API and implementation
10
 
 *******************************************************************************/
11
 
package org.eclipse.cdt.examples.dsf.filebrowser;
12
 
 
13
 
import java.io.File;
14
 
 
15
 
import org.eclipse.cdt.dsf.ui.viewmodel.AbstractVMContext;
16
 
import org.eclipse.cdt.dsf.ui.viewmodel.IVMNode;
17
 
 
18
 
class FileVMContext extends AbstractVMContext {
19
 
    private File fFile;
20
 
    FileVMContext(IVMNode layoutNode, File file) {
21
 
        super(layoutNode);
22
 
        fFile = file;
23
 
    }
24
 
    
25
 
    File getFile() { return fFile; }
26
 
    
27
 
    @Override
28
 
    public boolean equals(Object obj) {
29
 
        return obj instanceof FileVMContext && ((FileVMContext)obj).getFile().equals(fFile);
30
 
    }
31
 
    
32
 
    @Override
33
 
    public int hashCode() {
34
 
        return fFile.hashCode();
35
 
    }
36
 
    
37
 
    @Override
38
 
    public String toString() {
39
 
        return fFile.toString();
40
 
    }
41
 
}
 
 
b'\\ No newline at end of file'