mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-24 08:44:01 +02:00
[187571] Classification is empty for local directories
This commit is contained in:
parent
ad6d96c018
commit
bf869e9058
1 changed files with 17 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2006, 2007 IBM Corporation and others.
|
* Copyright (c) 2006, 2008 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
* Emily Bruner, Mazen Faraj, Adrian Storisteanu, Li Ding, and Kent Hawley.
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* {Name} (company) - description of contribution.
|
* Martin Oberhuber (Wind River) - [187571] Classification is empty for local directories
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.rse.internal.subsystems.files.local.model;
|
package org.eclipse.rse.internal.subsystems.files.local.model;
|
||||||
|
@ -61,11 +61,15 @@ public class LocalFile extends AbstractRemoteFile implements IRemoteFile
|
||||||
|
|
||||||
public String getClassification() {
|
public String getClassification() {
|
||||||
|
|
||||||
if (_classification == null && isFile())
|
if (_classification == null) {
|
||||||
{
|
if (isFile()) {
|
||||||
_classification = SystemFileClassifier.getInstance().classifyFile(getAbsolutePath());
|
_classification = SystemFileClassifier.getInstance().classifyFile(getAbsolutePath());
|
||||||
|
} else if (isDirectory()) {
|
||||||
|
_classification = "directory"; //$NON-NLS-1$
|
||||||
|
} else {
|
||||||
|
_classification = "unknown"; //$NON-NLS-1$
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return _classification;
|
return _classification;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue