final variables and parameters
This commit is contained in:
@@ -61,7 +61,7 @@ public class ItemRepo
|
||||
private String NEIWord = null;
|
||||
private boolean hasPower;
|
||||
|
||||
public ItemRepo( IScrollSource src, ISortSource sortSrc )
|
||||
public ItemRepo( final IScrollSource src, final ISortSource sortSrc )
|
||||
{
|
||||
this.src = src;
|
||||
this.sortSrc = sortSrc;
|
||||
@@ -89,14 +89,14 @@ public class ItemRepo
|
||||
return this.dsp.get( idx );
|
||||
}
|
||||
|
||||
void setSearch( String search )
|
||||
void setSearch( final String search )
|
||||
{
|
||||
this.searchString = search == null ? "" : search;
|
||||
}
|
||||
|
||||
public void postUpdate( IAEItemStack is )
|
||||
public void postUpdate( final IAEItemStack is )
|
||||
{
|
||||
IAEItemStack st = this.list.findPrecise( is );
|
||||
final IAEItemStack st = this.list.findPrecise( is );
|
||||
|
||||
if( st != null )
|
||||
{
|
||||
@@ -109,7 +109,7 @@ public class ItemRepo
|
||||
}
|
||||
}
|
||||
|
||||
public void setViewCell( ItemStack[] list )
|
||||
public void setViewCell( final ItemStack[] list )
|
||||
{
|
||||
this.myPartitionList = ItemViewCell.createFilter( list );
|
||||
this.updateView();
|
||||
@@ -123,15 +123,15 @@ public class ItemRepo
|
||||
this.view.ensureCapacity( this.list.size() );
|
||||
this.dsp.ensureCapacity( this.list.size() );
|
||||
|
||||
Enum viewMode = this.sortSrc.getSortDisplay();
|
||||
Enum searchMode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
|
||||
final Enum viewMode = this.sortSrc.getSortDisplay();
|
||||
final Enum searchMode = AEConfig.instance.settings.getSetting( Settings.SEARCH_MODE );
|
||||
if( searchMode == SearchBoxMode.NEI_AUTOSEARCH || searchMode == SearchBoxMode.NEI_MANUAL_SEARCH )
|
||||
{
|
||||
this.updateNEI( this.searchString );
|
||||
}
|
||||
|
||||
this.innerSearch = this.searchString;
|
||||
boolean terminalSearchToolTips = AEConfig.instance.settings.getSetting( Settings.SEARCH_TOOLTIPS ) != YesNo.NO;
|
||||
final boolean terminalSearchToolTips = AEConfig.instance.settings.getSetting( Settings.SEARCH_TOOLTIPS ) != YesNo.NO;
|
||||
// boolean terminalSearchMods = Configuration.INSTANCE.settings.getSetting( Settings.SEARCH_MODS ) != YesNo.NO;
|
||||
|
||||
boolean searchMod = false;
|
||||
@@ -146,13 +146,13 @@ public class ItemRepo
|
||||
{
|
||||
m = Pattern.compile( this.innerSearch.toLowerCase(), Pattern.CASE_INSENSITIVE );
|
||||
}
|
||||
catch( Throwable ignore )
|
||||
catch( final Throwable ignore )
|
||||
{
|
||||
try
|
||||
{
|
||||
m = Pattern.compile( Pattern.quote( this.innerSearch.toLowerCase() ), Pattern.CASE_INSENSITIVE );
|
||||
}
|
||||
catch( Throwable __ )
|
||||
catch( final Throwable __ )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -185,7 +185,7 @@ public class ItemRepo
|
||||
continue;
|
||||
}
|
||||
|
||||
String dspName = searchMod ? Platform.getModId( is ) : Platform.getItemDisplayName( is );
|
||||
final String dspName = searchMod ? Platform.getModId( is ) : Platform.getItemDisplayName( is );
|
||||
notDone = true;
|
||||
|
||||
if( m.matcher( dspName.toLowerCase() ).find() )
|
||||
@@ -196,7 +196,7 @@ public class ItemRepo
|
||||
|
||||
if( terminalSearchToolTips && notDone )
|
||||
{
|
||||
for( Object lp : Platform.getTooltip( is ) )
|
||||
for( final Object lp : Platform.getTooltip( is ) )
|
||||
{
|
||||
if( lp instanceof String && m.matcher( (CharSequence) lp ).find() )
|
||||
{
|
||||
@@ -213,8 +213,8 @@ public class ItemRepo
|
||||
*/
|
||||
}
|
||||
|
||||
Enum SortBy = this.sortSrc.getSortBy();
|
||||
Enum SortDir = this.sortSrc.getSortDir();
|
||||
final Enum SortBy = this.sortSrc.getSortBy();
|
||||
final Enum SortDir = this.sortSrc.getSortDir();
|
||||
|
||||
ItemSorters.Direction = (appeng.api.config.SortDir) SortDir;
|
||||
ItemSorters.init();
|
||||
@@ -236,31 +236,31 @@ public class ItemRepo
|
||||
Collections.sort( this.view, ItemSorters.CONFIG_BASED_SORT_BY_NAME );
|
||||
}
|
||||
|
||||
for( IAEItemStack is : this.view )
|
||||
for( final IAEItemStack is : this.view )
|
||||
{
|
||||
this.dsp.add( is.getItemStack() );
|
||||
}
|
||||
}
|
||||
|
||||
private void updateNEI( String filter )
|
||||
private void updateNEI( final String filter )
|
||||
{
|
||||
try
|
||||
{
|
||||
if( this.NEIWord == null || !this.NEIWord.equals( filter ) )
|
||||
{
|
||||
Class c = ReflectionHelper.getClass( this.getClass().getClassLoader(), "codechicken.nei.LayoutManager" );
|
||||
Field fldSearchField = c.getField( "searchField" );
|
||||
Object searchField = fldSearchField.get( c );
|
||||
final Class c = ReflectionHelper.getClass( this.getClass().getClassLoader(), "codechicken.nei.LayoutManager" );
|
||||
final Field fldSearchField = c.getField( "searchField" );
|
||||
final Object searchField = fldSearchField.get( c );
|
||||
|
||||
Method a = searchField.getClass().getMethod( "setText", String.class );
|
||||
Method b = searchField.getClass().getMethod( "onTextChange", String.class );
|
||||
final Method a = searchField.getClass().getMethod( "setText", String.class );
|
||||
final Method b = searchField.getClass().getMethod( "onTextChange", String.class );
|
||||
|
||||
this.NEIWord = filter;
|
||||
a.invoke( searchField, filter );
|
||||
b.invoke( searchField, "" );
|
||||
}
|
||||
}
|
||||
catch( Throwable ignore )
|
||||
catch( final Throwable ignore )
|
||||
{
|
||||
|
||||
}
|
||||
@@ -281,7 +281,7 @@ public class ItemRepo
|
||||
return this.hasPower;
|
||||
}
|
||||
|
||||
public void setPower( boolean hasPower )
|
||||
public void setPower( final boolean hasPower )
|
||||
{
|
||||
this.hasPower = hasPower;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user