Add an IntelliJ settings file describing the Dolphin project code style.

This commit is contained in:
Eder Bastos
2015-05-10 17:48:46 -04:00
parent abaf41baa7
commit f3aec526b1
5 changed files with 17 additions and 12 deletions

View File

@ -30,7 +30,6 @@
android:theme="@style/DolphinWii"
android:label="@string/add_directory_title"/>
<activity
android:name="org.dolphinemu.dolphinemu.gamelist.GameListActivity"
android:label="@string/app_name"

View File

@ -26,7 +26,7 @@ public class FileAdapter extends RecyclerView.Adapter<FileViewHolder> implements
* Initializes the dataset to be displayed, and associates the Adapter with the
* Activity as an event listener.
*
* @param path A String containing the path to the directory to be shown by this Adapter.
* @param path A String containing the path to the directory to be shown by this Adapter.
* @param listener An Activity that can respond to callbacks from this Adapter.
*/
public FileAdapter(String path, FileClickListener listener)
@ -125,7 +125,8 @@ public class FileAdapter extends RecyclerView.Adapter<FileViewHolder> implements
if (fileList.isEmpty())
{
Toast.makeText(view.getContext(), R.string.add_directory_empty_folder, Toast.LENGTH_SHORT).show();
} else
}
else
{
// Delay the loading of the new directory to give a little bit of time for UI feedback
// to happen. Hacky, but good enough for now; this is necessary because we're modifying
@ -141,7 +142,8 @@ public class FileAdapter extends RecyclerView.Adapter<FileViewHolder> implements
}
}, 200);
}
} else
}
else
{
// Pass the activity the path of the parent directory of the clicked file.
mListener.finishSuccessfully();

View File

@ -26,7 +26,8 @@ public class FileListItem implements Comparable<FileListItem>
if (file.isDirectory())
{
mType = TYPE_FOLDER;
} else
}
else
{
String fileExtension = mPath.substring(mPath.lastIndexOf('.'));
@ -37,7 +38,8 @@ public class FileListItem implements Comparable<FileListItem>
if (allowedExtensions.contains(fileExtension))
{
mType = NativeLibrary.IsWiiTitle(mPath) ? TYPE_WII : TYPE_GC;
} else
}
else
{
mType = TYPE_OTHER;
}
@ -67,12 +69,14 @@ public class FileListItem implements Comparable<FileListItem>
if (theOther.getType() == getType())
{
return getFilename().toLowerCase().compareTo(theOther.getFilename().toLowerCase());
} else
}
else
{
if (getType() > theOther.getType())
{
return 1;
} else
}
else
{
return -1;
}