conflict_resolution
stringlengths
27
16k
<<<<<<< import com.sleekbyte.tailor.antlr.SwiftParser.GenericParameterContext; ======= import com.sleekbyte.tailor.antlr.SwiftParser.GetterClauseContext; >>>>>>> import com.sleekbyte.tailor.antlr.SwiftParser.GenericParameterContext; import com.sleekbyte.tailor.antlr.SwiftParser.GetterClauseContext;
<<<<<<< public static final String ONLY_SPECIFIC_RULES_DESC = "run only the specified rules"; public static final String EXCEPT_RULES_DESC = "run all rules except the specified ones"; ======= public static final String XCODE_INTEGRATION_DESC = "add Tailor Build Phase Run Script to Xcode Project"; >>>>>>> public static final String ONLY_SPECIFIC_RULES_DESC = "run only the specified rules"; public static final String EXCEPT_RULES_DESC = "run all rules except the specified ones"; public static final String XCODE_INTEGRATION_DESC = "add Tailor Build Phase Run Script to Xcode Project";
<<<<<<< import static com.sleekbyte.tailor.antlr.SwiftParser.ElseClauseContext; import static com.sleekbyte.tailor.antlr.SwiftParser.ExpressionContext; import static com.sleekbyte.tailor.antlr.SwiftParser.ForInStatementContext; import static com.sleekbyte.tailor.antlr.SwiftParser.ForStatementContext; import static com.sleekbyte.tailor.antlr.SwiftParser.FunctionDeclarationContext; import static com.sleekbyte.tailor.antlr.SwiftParser.IfStatementContext; import static com.sleekbyte.tailor.antlr.SwiftParser.ImportDeclarationContext; import static com.sleekbyte.tailor.antlr.SwiftParser.InitializerDeclarationContext; import static com.sleekbyte.tailor.antlr.SwiftParser.OptionalBindingContinuationContext; import static com.sleekbyte.tailor.antlr.SwiftParser.OptionalBindingHeadContext; import static com.sleekbyte.tailor.antlr.SwiftParser.ParenthesizedExpressionContext; import static com.sleekbyte.tailor.antlr.SwiftParser.PatternContext; import static com.sleekbyte.tailor.antlr.SwiftParser.PatternInitializerContext; import static com.sleekbyte.tailor.antlr.SwiftParser.PatternInitializerListContext; import static com.sleekbyte.tailor.antlr.SwiftParser.PostfixExpressionContext; import static com.sleekbyte.tailor.antlr.SwiftParser.PrimaryExpressionContext; import static com.sleekbyte.tailor.antlr.SwiftParser.RepeatWhileStatementContext; import static com.sleekbyte.tailor.antlr.SwiftParser.SwitchStatementContext; import static com.sleekbyte.tailor.antlr.SwiftParser.TuplePatternContext; import static com.sleekbyte.tailor.antlr.SwiftParser.TuplePatternElementContext; import static com.sleekbyte.tailor.antlr.SwiftParser.WhileStatementContext; ======= >>>>>>> <<<<<<< import com.sleekbyte.tailor.antlr.SwiftParser.ClassBodyContext; import com.sleekbyte.tailor.antlr.SwiftParser.ClosureExpressionContext; import com.sleekbyte.tailor.antlr.SwiftParser.ExpressionElementListContext; ======= import com.sleekbyte.tailor.antlr.SwiftParser.ClassDeclarationContext; import com.sleekbyte.tailor.antlr.SwiftParser.DictionaryLiteralItemContext; import com.sleekbyte.tailor.antlr.SwiftParser.DictionaryTypeContext; import com.sleekbyte.tailor.antlr.SwiftParser.ElseClauseContext; import com.sleekbyte.tailor.antlr.SwiftParser.ExpressionContext; import com.sleekbyte.tailor.antlr.SwiftParser.ForInStatementContext; import com.sleekbyte.tailor.antlr.SwiftParser.ForStatementContext; import com.sleekbyte.tailor.antlr.SwiftParser.FunctionDeclarationContext; import com.sleekbyte.tailor.antlr.SwiftParser.GenericParameterClauseContext; import com.sleekbyte.tailor.antlr.SwiftParser.IfStatementContext; import com.sleekbyte.tailor.antlr.SwiftParser.ImportDeclarationContext; import com.sleekbyte.tailor.antlr.SwiftParser.InitializerDeclarationContext; >>>>>>> import com.sleekbyte.tailor.antlr.SwiftParser.ClassBodyContext; import com.sleekbyte.tailor.antlr.SwiftParser.ClosureExpressionContext; import com.sleekbyte.tailor.antlr.SwiftParser.DictionaryLiteralItemContext; import com.sleekbyte.tailor.antlr.SwiftParser.DictionaryTypeContext; import com.sleekbyte.tailor.antlr.SwiftParser.ElseClauseContext; import com.sleekbyte.tailor.antlr.SwiftParser.ExpressionContext; import com.sleekbyte.tailor.antlr.SwiftParser.ExpressionElementListContext; import com.sleekbyte.tailor.antlr.SwiftParser.ForInStatementContext; import com.sleekbyte.tailor.antlr.SwiftParser.ForStatementContext; import com.sleekbyte.tailor.antlr.SwiftParser.FunctionDeclarationContext; import com.sleekbyte.tailor.antlr.SwiftParser.IfStatementContext; import com.sleekbyte.tailor.antlr.SwiftParser.ImportDeclarationContext; import com.sleekbyte.tailor.antlr.SwiftParser.InitializerDeclarationContext; <<<<<<< import com.sleekbyte.tailor.antlr.SwiftParser.ProtocolBodyContext; import com.sleekbyte.tailor.antlr.SwiftParser.StructBodyContext; ======= import com.sleekbyte.tailor.antlr.SwiftParser.OptionalBindingContinuationContext; import com.sleekbyte.tailor.antlr.SwiftParser.OptionalBindingHeadContext; import com.sleekbyte.tailor.antlr.SwiftParser.ParenthesizedExpressionContext; import com.sleekbyte.tailor.antlr.SwiftParser.PatternContext; import com.sleekbyte.tailor.antlr.SwiftParser.PatternInitializerContext; import com.sleekbyte.tailor.antlr.SwiftParser.PatternInitializerListContext; import com.sleekbyte.tailor.antlr.SwiftParser.PostfixExpressionContext; import com.sleekbyte.tailor.antlr.SwiftParser.PrimaryExpressionContext; import com.sleekbyte.tailor.antlr.SwiftParser.RepeatWhileStatementContext; import com.sleekbyte.tailor.antlr.SwiftParser.StatementsContext; import com.sleekbyte.tailor.antlr.SwiftParser.StructDeclarationContext; import com.sleekbyte.tailor.antlr.SwiftParser.SwitchCaseContext; import com.sleekbyte.tailor.antlr.SwiftParser.SwitchStatementContext; import com.sleekbyte.tailor.antlr.SwiftParser.TuplePatternContext; import com.sleekbyte.tailor.antlr.SwiftParser.TuplePatternElementContext; >>>>>>> import com.sleekbyte.tailor.antlr.SwiftParser.OptionalBindingContinuationContext; import com.sleekbyte.tailor.antlr.SwiftParser.OptionalBindingHeadContext; import com.sleekbyte.tailor.antlr.SwiftParser.ParenthesizedExpressionContext; import com.sleekbyte.tailor.antlr.SwiftParser.PatternContext; import com.sleekbyte.tailor.antlr.SwiftParser.PatternInitializerContext; import com.sleekbyte.tailor.antlr.SwiftParser.PatternInitializerListContext; import com.sleekbyte.tailor.antlr.SwiftParser.PostfixExpressionContext; import com.sleekbyte.tailor.antlr.SwiftParser.PrimaryExpressionContext; import com.sleekbyte.tailor.antlr.SwiftParser.ProtocolBodyContext; import com.sleekbyte.tailor.antlr.SwiftParser.RepeatWhileStatementContext; import com.sleekbyte.tailor.antlr.SwiftParser.StatementsContext; import com.sleekbyte.tailor.antlr.SwiftParser.StructBodyContext; import com.sleekbyte.tailor.antlr.SwiftParser.SwitchCaseContext; import com.sleekbyte.tailor.antlr.SwiftParser.SwitchStatementContext; import com.sleekbyte.tailor.antlr.SwiftParser.TuplePatternContext; import com.sleekbyte.tailor.antlr.SwiftParser.TuplePatternElementContext;
<<<<<<< printer.error(Rules.WHITESPACE, Messages.OPERATOR + Messages.SPACE_BEFORE, ListenerUtil.getContextStopLocation(op)); ======= printer.error(Messages.OPERATOR + Messages.SPACE_BEFORE, ListenerUtil.getContextStartLocation(op)); >>>>>>> printer.error(Rules.WHITESPACE, Messages.OPERATOR + Messages.SPACE_BEFORE, ListenerUtil.getContextStartLocation(op)); <<<<<<< if (checkRightSpaces(after, op.getStart(), 1)) { printer.error(Rules.WHITESPACE, Messages.OPERATOR + Messages.SPACE_AFTER, ListenerUtil.getContextStopLocation(op)); ======= if (checkRightSpaces(after, op.getStop(), 1)) { printer.error(Messages.OPERATOR + Messages.SPACE_AFTER, ListenerUtil.getContextStartLocation(op)); >>>>>>> if (checkRightSpaces(after, op.getStop(), 1)) { printer.error(Rules.WHITESPACE, Messages.OPERATOR + Messages.SPACE_AFTER, ListenerUtil.getContextStartLocation(op));
<<<<<<< private void displayMessages(List<Map<String, Object>> violations, boolean parsed, String filePath) throws IOException { ======= private void storeMessages(List<Map<String, Object>> violations, boolean parsed) throws IOException { >>>>>>> private void storeMessages(List<Map<String, Object>> violations, boolean parsed, String filePath) throws IOException {
<<<<<<< addExpectedMsg(40, 21, Messages.ERROR, Messages.STATEMENTS); addExpectedMsg(64, 2, Messages.ERROR, Messages.STATEMENTS); ======= addExpectedMsg(40, 23, Messages.ERROR, Messages.STATEMENTS); addExpectedMsg(41, 6, Messages.ERROR, Messages.STATEMENTS); addExpectedMsg(42, 2, Messages.ERROR, Messages.STATEMENTS); >>>>>>> addExpectedMsg(40, 21, Messages.ERROR, Messages.STATEMENTS); addExpectedMsg(41, 6, Messages.ERROR, Messages.STATEMENTS); addExpectedMsg(42, 2, Messages.ERROR, Messages.STATEMENTS);
<<<<<<< import com.sleekbyte.tailor.output.Printer; import com.sleekbyte.tailor.swift.SwiftLexer; import com.sleekbyte.tailor.swift.SwiftParser; ======= >>>>>>> import com.sleekbyte.tailor.output.Printer;
<<<<<<< public static final String XCODE_INTEGRATION_DESC = "add Tailor Build Phase Run Script to Xcode Project"; ======= public static final String DEBUG_DESC = "print ANTLR error messages when parsing error occurs"; public static final String NO_COLOR_DESC = "disable colorized console output"; public static final String INVERT_COLOR_DESC = "invert colorized console output"; >>>>>>> public static final String XCODE_INTEGRATION_DESC = "add Tailor Build Phase Run Script to Xcode Project"; public static final String DEBUG_DESC = "print ANTLR error messages when parsing error occurs"; public static final String NO_COLOR_DESC = "disable colorized console output"; public static final String INVERT_COLOR_DESC = "invert colorized console output";
<<<<<<< import com.sleekbyte.tailor.utils.ArgumentParser; import com.sleekbyte.tailor.utils.ArgumentParser.ArgumentParserException; ======= import com.sleekbyte.tailor.utils.CliArgumentParserException; >>>>>>> import com.sleekbyte.tailor.utils.ArgumentParser; import com.sleekbyte.tailor.utils.ArgumentParser.ArgumentParserException; import com.sleekbyte.tailor.utils.CliArgumentParserException; <<<<<<< import java.util.TreeSet; import java.util.concurrent.ConcurrentMap; import java.util.function.Function; ======= >>>>>>> import java.util.concurrent.ConcurrentMap; import java.util.function.Function; <<<<<<< private static ArgumentParser argumentParser = new ArgumentParser(); private static List<String> pathNames; private static long numSkippedFiles = 0; private static long numErrors = 0; private static long numWarnings = 0; ======= private static Configuration configuration; >>>>>>> private static ArgumentParser argumentParser = new ArgumentParser(); private static List<String> pathNames; private static long numSkippedFiles = 0; private static long numErrors = 0; private static long numWarnings = 0; private static Configuration configuration; <<<<<<< CommonTokenStream tokenStream, ConstructLengths constructLengths) throws ArgumentParserException { ======= CommonTokenStream tokenStream) throws CliArgumentParserException { >>>>>>> CommonTokenStream tokenStream, ConstructLengths constructLengths) throws CliArgumentParserException { <<<<<<< try { try (Printer printer = new Printer(inputFile, maxSeverity, colorSettings)) { if (optTokenStream.isPresent() && optTree.isPresent()) { CommonTokenStream tokenStream = optTokenStream.get(); TopLevelContext tree = optTree.get(); List<SwiftBaseListener> listeners = createListeners( enabledRules, printer, tokenStream, constructLengths ); walkParseTree(listeners, tree); try (FileListener fileListener = new FileListener(printer, inputFile, constructLengths, enabledRules)) { fileListener.verify(); ======= for (String fileName : fileNames) { File inputFile = new File(fileName); CommonTokenStream tokenStream; SwiftParser.TopLevelContext tree; formatter = configuration.getFormatter(inputFile, colorSettings); try { tokenStream = getTokenStream(inputFile); tree = getParseTree(tokenStream); } catch (ErrorListener.ParseException e) { Printer printer = new Printer(inputFile, maxSeverity, formatter); printer.printParseErrorMessage(); numSkippedFiles++; continue; } try (Printer printer = new Printer(inputFile, maxSeverity, formatter)) { List<SwiftBaseListener> listeners = createListeners(enabledRules, printer, tokenStream); listeners.add(new MaxLengthListener(printer, constructLengths, enabledRules)); listeners.add(new MinLengthListener(printer, constructLengths, enabledRules)); DeclarationListener decListener = new DeclarationListener(listeners); listeners.add(decListener); ParseTreeWalker walker = new ParseTreeWalker(); for (SwiftBaseListener listener : listeners) { // The following listeners are used by DeclarationListener to walk the tree if (listener instanceof ConstantNamingListener || listener instanceof KPrefixListener) { continue; >>>>>>> for (String fileName : fileNames) { File inputFile = new File(fileName); CommonTokenStream tokenStream; SwiftParser.TopLevelContext tree; formatter = configuration.getFormatter(inputFile, colorSettings); try { tokenStream = getTokenStream(inputFile); tree = getParseTree(tokenStream); } catch (ErrorListener.ParseException e) { Printer printer = new Printer(inputFile, maxSeverity, formatter); printer.printParseErrorMessage(); numSkippedFiles++; continue; } try (Printer printer = new Printer(inputFile, maxSeverity, formatter)) { List<SwiftBaseListener> listeners = createListeners(enabledRules, printer, tokenStream); listeners.add(new MaxLengthListener(printer, constructLengths, enabledRules)); listeners.add(new MinLengthListener(printer, constructLengths, enabledRules)); DeclarationListener decListener = new DeclarationListener(listeners); listeners.add(decListener); ParseTreeWalker walker = new ParseTreeWalker(); for (SwiftBaseListener listener : listeners) { // The following listeners are used by DeclarationListener to walk the tree if (listener instanceof ConstantNamingListener || listener instanceof KPrefixListener) { continue; <<<<<<< } catch (ParseException | ArgumentParserException e) { handleCliException(e); ======= } catch (ParseException | CliArgumentParserException e) { System.err.println(e.getMessage()); configuration.printHelp(); System.exit(ExitCode.failure()); >>>>>>> } catch (ParseException | CliArgumentParserException e) { System.err.println(e.getMessage()); configuration.printHelp(); System.exit(ExitCode.failure());
<<<<<<< private Eddy makeEddy() { EddyPlugin.getInstance(myFixture.getProject()).initLibrariesEnv(); ======= private Eddy makeEddy(@Nullable String special) { EnvironmentProcessor.clearGlobalEnvironment(); >>>>>>> private Eddy makeEddy(@Nullable String special) { EddyPlugin.getInstance(myFixture.getProject()).initLibrariesEnv(); <<<<<<< Eddy eddy = setupEddy("denote_x.java"); ======= EnvironmentProcessor.clearGlobalEnvironment(); Eddy eddy = setupEddy(null,"denote_x.java"); >>>>>>> Eddy eddy = setupEddy(null,"denote_x.java"); <<<<<<< Eddy eddy = setupEddy("dummy.java", ======= EnvironmentProcessor.clearGlobalEnvironment(); Eddy eddy = setupEddy(null,"dummy.java", >>>>>>> Eddy eddy = setupEddy(null,"dummy.java",
<<<<<<< import scala.runtime.AbstractFunction2; ======= import scala.runtime.AbstractFunction1; >>>>>>> import scala.runtime.AbstractFunction1; import scala.runtime.AbstractFunction2; <<<<<<< private String unabbrev(final String abbrev) { for (final Alt<ShowStmts> r : results) ======= public String unabbrev(final String abbrev) { for (final Alt<List<ShowStmt>> r : results) >>>>>>> public String unabbrev(final String abbrev) { for (final Alt<ShowStmts> r : results)
<<<<<<< import fr.inria.papart.procam.Screen; ======= import fr.inria.papart.procam.display.ARDisplay; import fr.inria.papart.procam.PaperScreen; >>>>>>> import fr.inria.papart.procam.display.ARDisplay; import fr.inria.papart.procam.PaperScreen; <<<<<<< import fr.inria.papart.multitouch.detection.ArmDetection; import fr.inria.papart.multitouch.detection.FingerDetection; import fr.inria.papart.multitouch.detection.HandDetection; import fr.inria.papart.multitouch.detection.TouchDetectionDepth; ======= import fr.inria.papart.multitouch.detection.Simple2D; import fr.inria.papart.multitouch.detection.Simple3D; import fr.inria.papart.procam.PaperScreen; >>>>>>> import fr.inria.papart.multitouch.detection.Simple2D; import fr.inria.papart.multitouch.detection.Simple3D; import fr.inria.papart.procam.PaperScreen; <<<<<<< private Touch createTouch(Screen screen, BaseDisplay display, TrackedDepthPoint tp) { Touch touch = tp.createTouch(); ======= private Touch createTouch(PaperScreen screen, BaseDisplay display, TrackedDepthPoint tp) { Touch touch = tp.getTouch(); >>>>>>> private Touch createTouch(PaperScreen screen, BaseDisplay display, TrackedDepthPoint tp) { Touch touch = tp.getTouch(); <<<<<<< ======= public ArrayList<DepthDataElementProjected> getDepthData() { try { depthDataSem.acquire(); ProjectedDepthData depthData = depthAnalysis.getDepthData(); ArrayList<DepthDataElementProjected> output = new ArrayList<>(); ArrayList<Integer> list = depthData.validPointsList3D; for (Integer i : list) { output.add(depthData.getElementKinect(i)); } depthDataSem.release(); return output; } catch (InterruptedException ex) { Logger.getLogger(DepthTouchInput.class .getName()).log(Level.SEVERE, null, ex); return null; } } // TODO: Do the same without the Display, use the extrinsics instead!  // TODO: Do the same with DepthDataElement instead of DepthPoint ? public ArrayList<DepthPoint> projectDepthData(ARDisplay display, PaperScreen screen) { ArrayList<DepthPoint> list = projectDepthData2D(display, screen); list.addAll(projectDepthData3D(display, screen)); return list; } public ArrayList<DepthPoint> projectDepthData2D(ARDisplay display, PaperScreen screen) { return projectDepthDataXD(display, screen, true); } public ArrayList<DepthPoint> projectDepthData3D(ARDisplay display, PaperScreen screen) { return projectDepthDataXD(display, screen, false); } private ArrayList<DepthPoint> projectDepthDataXD(ARDisplay display, PaperScreen screen, boolean is2D) { try { depthDataSem.acquire(); ProjectedDepthData depthData = depthAnalysis.getDepthData(); ArrayList<DepthPoint> projected = new ArrayList<DepthPoint>(); ArrayList<Integer> list = is2D ? depthData.validPointsList : depthData.validPointsList3D; for (Integer i : list) { DepthPoint depthPoint = tryCreateDepthPoint(display, screen, i); if (depthPoint != null) { projected.add(depthPoint); } } depthDataSem.release(); return projected; } catch (InterruptedException ex) { Logger.getLogger(DepthTouchInput.class .getName()).log(Level.SEVERE, null, ex); return null; } } private DepthPoint tryCreateDepthPoint(ARDisplay display, PaperScreen screen, int offset) { Vec3D projectedPt = depthAnalysis.getDepthData().projectedPoints[offset]; PVector screenPosition = projectPointToScreen(screen, display, depthAnalysis.getDepthData().depthPoints[offset], projectedPt); if (screenPosition == NO_INTERSECTION) { return null; } int c = depthAnalysis.getDepthData().pointColors[offset]; return new DepthPoint(screenPosition.x, screenPosition.y, screenPosition.z, c); } >>>>>>>
<<<<<<< io.lumify.core.user.User authUser = CurrentUser.get(resource.session()); if (authUser == null) { ======= String authUserId = AuthenticationProvider.getUserId(resource.session()); if (authUserId == null) { >>>>>>> String authUserId = CurrentUser.get(resource.session()); if (authUserId == null) { <<<<<<< io.lumify.core.user.User authUser = CurrentUser.get(resource.getRequest()); if (authUser == null) { ======= String authUserId = AuthenticationProvider.getUserId(resource.getRequest().getSession()); if (authUserId == null) { >>>>>>> String authUserId = CurrentUser.get(resource.getRequest()); if (authUserId == null) {
<<<<<<< import fr.inria.papart.depthcam.DepthAnalysis; import fr.inria.papart.depthcam.devices.KinectDepthAnalysis; import fr.inria.papart.depthcam.PixelOffset; ======= >>>>>>> import fr.inria.papart.depthcam.DepthAnalysis; import fr.inria.papart.depthcam.devices.KinectDepthAnalysis; import fr.inria.papart.depthcam.PixelOffset; <<<<<<< ArrayList<FutureTask<ARTrackingTask>> tasks = new ArrayList<>(); ======= tryInitThreadPool(); ArrayList<FutureTask<DepthPixelTask>> tasks = new ArrayList<>(); >>>>>>> tryInitThreadPool(); ArrayList<FutureTask<ARTrackingTask>> tasks = new ArrayList<>();
<<<<<<< import androidx.annotation.NonNull; ======= import android.os.Environment; import android.support.annotation.NonNull; >>>>>>> import androidx.annotation.NonNull; <<<<<<< ======= import com.zhongjh.albumcamerarecorder.settings.CameraSpec; import com.zhongjh.albumcamerarecorder.settings.GlobalSpec; import com.zhongjh.albumcamerarecorder.settings.RecordeSpec; import com.zhongjh.albumcamerarecorder.utils.DisplayMetricsUtils; >>>>>>> import com.zhongjh.albumcamerarecorder.settings.CameraSpec; import com.zhongjh.albumcamerarecorder.settings.GlobalSpec; import com.zhongjh.albumcamerarecorder.settings.RecordeSpec; import com.zhongjh.albumcamerarecorder.utils.DisplayMetricsUtils;
<<<<<<< * 为保存内部和外部文件的位置提供的捕获策略{@link androidx.core.content.FileProvider}. ======= * 保存文件的位置{@link android.support.v4.content.FileProvider}. >>>>>>> * 保存文件的位置{@link androidx.core.content.FileProvider}.
<<<<<<< ======= import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFWebConfigParam; >>>>>>> import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFWebConfigParam; <<<<<<< //private static final Log log = LogFactory.getLog(FacesServlet.class); private static final Logger log = Logger.getLogger(FacesServlet.class.getName()); ======= private static final Log log = LogFactory.getLog(FacesServlet.class); /** * Comma separated list of URIs of (additional) faces config files. * (e.g. /WEB-INF/my-config.xml)See JSF 1.0 PRD2, 10.3.2 * Attention: You do not need to put /WEB-INF/faces-config.xml in here. */ @JSFWebConfigParam(since="1.1") >>>>>>> //private static final Log log = LogFactory.getLog(FacesServlet.class); private static final Logger log = Logger.getLogger(FacesServlet.class.getName()); /** * Comma separated list of URIs of (additional) faces config files. * (e.g. /WEB-INF/my-config.xml)See JSF 1.0 PRD2, 10.3.2 * Attention: You do not need to put /WEB-INF/faces-config.xml in here. */ @JSFWebConfigParam(since="1.1")
<<<<<<< import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.OutputStream; import java.io.Serializable; import java.lang.reflect.Method; import java.security.AccessController; import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; ======= import org.apache.commons.collections.map.AbstractReferenceMap; import org.apache.commons.collections.map.ReferenceMap; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.myfaces.application.MyfacesStateManager; import org.apache.myfaces.application.TreeStructureManager; import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFWebConfigParam; import org.apache.myfaces.renderkit.MyfacesResponseStateManager; import org.apache.myfaces.shared_impl.renderkit.RendererUtils; import org.apache.myfaces.shared_impl.util.MyFacesObjectInputStream; >>>>>>> import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.OutputStream; import java.io.Serializable; import java.lang.reflect.Method; import java.security.AccessController; import java.security.PrivilegedActionException; import java.security.PrivilegedExceptionAction; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Set; import java.util.logging.Level; import java.util.logging.Logger; import java.util.zip.GZIPInputStream; import java.util.zip.GZIPOutputStream; import org.apache.commons.collections.map.AbstractReferenceMap; import org.apache.commons.collections.map.ReferenceMap; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.myfaces.application.MyfacesStateManager; import org.apache.myfaces.application.TreeStructureManager; import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFWebConfigParam; import org.apache.myfaces.renderkit.MyfacesResponseStateManager; import org.apache.myfaces.shared_impl.renderkit.RendererUtils; import org.apache.myfaces.shared_impl.util.MyFacesObjectInputStream;
<<<<<<< private List<ClientApiWorkspaceDiff.Item> diffEdge(Workspace workspace, Edge edge, Authorizations hiddenAuthorizations) { List<ClientApiWorkspaceDiff.Item> result = new ArrayList<ClientApiWorkspaceDiff.Item>(); ======= private List<ClientApiWorkspaceDiff.Item> diffEdge(Workspace workspace, Edge edge) { List<ClientApiWorkspaceDiff.Item> result = new ArrayList<>(); >>>>>>> private List<ClientApiWorkspaceDiff.Item> diffEdge(Workspace workspace, Edge edge, Authorizations hiddenAuthorizations) { List<ClientApiWorkspaceDiff.Item> result = new ArrayList<>(); <<<<<<< public static boolean isPublicDelete(Edge edge, Authorizations authorizations) { return edge.isHidden(authorizations); } public static boolean isPublicDelete(Vertex vertex, Authorizations authorizations) { return vertex.isHidden(authorizations); } public static boolean isPublicDelete(Property property, Authorizations authorizations) { return property.isHidden(authorizations); } private ClientApiWorkspaceDiff.EdgeItem createWorkspaceDiffEdgeItem(Edge edge, SandboxStatus sandboxStatus, boolean deleted) { ======= private ClientApiWorkspaceDiff.EdgeItem createWorkspaceDiffEdgeItem(Edge edge, SandboxStatus sandboxStatus) { Property visibilityJsonProperty = LumifyProperties.VISIBILITY_JSON.getProperty(edge); JsonNode visibilityJson = visibilityJsonProperty == null ? null : JSONUtil.toJsonNode(JsonSerializer.toJsonProperty(visibilityJsonProperty)); >>>>>>> public static boolean isPublicDelete(Edge edge, Authorizations authorizations) { return edge.isHidden(authorizations); } public static boolean isPublicDelete(Vertex vertex, Authorizations authorizations) { return vertex.isHidden(authorizations); } public static boolean isPublicDelete(Property property, Authorizations authorizations) { return property.isHidden(authorizations); } private ClientApiWorkspaceDiff.EdgeItem createWorkspaceDiffEdgeItem(Edge edge, SandboxStatus sandboxStatus, boolean deleted) { Property visibilityJsonProperty = LumifyProperties.VISIBILITY_JSON.getProperty(edge); JsonNode visibilityJson = visibilityJsonProperty == null ? null : JSONUtil.toJsonNode(JsonSerializer.toJsonProperty(visibilityJsonProperty)); <<<<<<< JSONUtil.toJsonNode(JsonSerializer.toJsonProperty(LumifyProperties.VISIBILITY_JSON.getProperty(edge))), sandboxStatus, deleted ======= visibilityJson, sandboxStatus >>>>>>> visibilityJson, sandboxStatus, deleted <<<<<<< boolean isPrivateChange = sandboxStatus != SandboxStatus.PUBLIC; boolean isPublicDelete = WorkspaceDiffHelper.isPublicDelete(entityVertex, authorizations); if (isPrivateChange || isPublicDelete) { result.add(createWorkspaceDiffVertexItem(entityVertex, sandboxStatus, workspaceEntity.isVisible(), isPublicDelete)); ======= if (sandboxStatus != SandboxStatus.PUBLIC) { result.add(createWorkspaceDiffVertexItem(entityVertex, sandboxStatus, userContext, workspaceEntity.isVisible())); >>>>>>> boolean isPrivateChange = sandboxStatus != SandboxStatus.PUBLIC; boolean isPublicDelete = WorkspaceDiffHelper.isPublicDelete(entityVertex, authorizations); if (isPrivateChange || isPublicDelete) { result.add(createWorkspaceDiffVertexItem(entityVertex, sandboxStatus, userContext, workspaceEntity.isVisible(), isPublicDelete)); <<<<<<< private ClientApiWorkspaceDiff.VertexItem createWorkspaceDiffVertexItem(Vertex vertex, SandboxStatus sandboxStatus, boolean visible, boolean deleted) { String title = LumifyProperties.TITLE.getPropertyValue(vertex); String conceptType = LumifyProperties.CONCEPT_TYPE.getPropertyValue(vertex); ======= private ClientApiWorkspaceDiff.VertexItem createWorkspaceDiffVertexItem(Vertex vertex, SandboxStatus sandboxStatus, FormulaEvaluator.UserContext userContext, boolean visible) { String vertexId = vertex.getId(); String title = formulaEvaluator.evaluateTitleFormula(vertex, userContext, null); String conceptType = LumifyProperties.CONCEPT_TYPE.getPropertyValue(vertex); Property visibilityJsonProperty = LumifyProperties.VISIBILITY_JSON.getProperty(vertex); JsonNode visibilityJson = visibilityJsonProperty == null ? null : JSONUtil.toJsonNode(JsonSerializer.toJsonProperty(visibilityJsonProperty)); >>>>>>> private ClientApiWorkspaceDiff.VertexItem createWorkspaceDiffVertexItem(Vertex vertex, SandboxStatus sandboxStatus, FormulaEvaluator.UserContext userContext, boolean visible, boolean deleted) { String vertexId = vertex.getId(); String title = formulaEvaluator.evaluateTitleFormula(vertex, userContext, null); String conceptType = LumifyProperties.CONCEPT_TYPE.getPropertyValue(vertex); Property visibilityJsonProperty = LumifyProperties.VISIBILITY_JSON.getProperty(vertex); JsonNode visibilityJson = visibilityJsonProperty == null ? null : JSONUtil.toJsonNode(JsonSerializer.toJsonProperty(visibilityJsonProperty)); <<<<<<< conceptType, JSONUtil.toJsonNode(JsonSerializer.toJsonProperty(LumifyProperties.VISIBILITY_JSON.getProperty(vertex))), ======= conceptType, visibilityJson, >>>>>>> conceptType, visibilityJson,
<<<<<<< import java.util.Collection; import java.util.Iterator; import java.util.Locale; import java.util.Map; import java.util.ResourceBundle; ======= import java.util.Collection; import java.util.Iterator; import java.util.Locale; import java.util.ResourceBundle; >>>>>>> import java.util.Collection; import java.util.Iterator; import java.util.Locale; import java.util.Map; import java.util.ResourceBundle; <<<<<<< import javax.faces.component.UIViewRoot; import javax.faces.component.behavior.Behavior; ======= import javax.faces.context.ExternalContext; >>>>>>> import javax.faces.context.ExternalContext; import javax.faces.component.UIViewRoot; import javax.faces.component.behavior.Behavior; <<<<<<< import javax.faces.el.ValueBinding; import javax.faces.el.VariableResolver; import javax.faces.event.AbortProcessingException; import javax.faces.event.ActionListener; import javax.faces.event.SystemEvent; import javax.faces.event.SystemEventListener; import javax.faces.event.SystemEventListenerHolder; import javax.faces.validator.Validator; ======= >>>>>>> import javax.faces.el.ValueBinding; import javax.faces.el.VariableResolver; import javax.faces.event.AbortProcessingException; import javax.faces.event.ActionListener; import javax.faces.event.SystemEvent; import javax.faces.event.SystemEventListener; import javax.faces.event.SystemEventListenerHolder; import javax.faces.validator.Validator;
<<<<<<< import com.altamiracorp.lumify.core.model.ontology.PropertyType; import com.altamiracorp.lumify.core.model.properties.EntityLumifyProperties; ======= import com.altamiracorp.lumify.core.model.properties.EntityLumifyProperties; >>>>>>> import com.altamiracorp.lumify.core.model.ontology.PropertyType; import com.altamiracorp.lumify.core.model.properties.EntityLumifyProperties; <<<<<<< ======= import static com.altamiracorp.lumify.core.util.GraphUtil.toJson; import static com.altamiracorp.securegraph.util.IterableUtils.toList; import static com.google.common.base.Preconditions.checkNotNull; >>>>>>> import static com.altamiracorp.securegraph.util.IterableUtils.toList; import static com.google.common.base.Preconditions.checkNotNull; <<<<<<< entityVertexMutation.setProperty(LumifyProperties.GLYPH_ICON.getKey(), ArtifactThumbnail.getUrl(artifactVertex.getId()), lumifyVisibility.getVisibility()); ======= entityVertexMutation.setProperty(LumifyProperties.GLYPH_ICON.getKey(), ArtifactThumbnail.getUrl(imageVertex.getId()), metadata, lumifyVisibility.getVisibility()); >>>>>>> entityVertexMutation.setProperty(LumifyProperties.GLYPH_ICON.getKey(), ArtifactThumbnail.getUrl(artifactVertex.getId()), metadata, lumifyVisibility.getVisibility()); <<<<<<< graph.flush(); workQueueRepository.pushUserImageQueue(artifactVertex.getId().toString()); workQueueRepository.pushGraphPropertyQueue(artifactVertex.getId(), ElementMutation.DEFAULT_KEY, RawLumifyProperties.RAW.getKey()); ======= this.workspaceRepository.updateEntityOnWorkspace(workspace, imageVertex.getId(), null, null, null, user); this.workspaceRepository.updateEntityOnWorkspace(workspace, entityVertex.getId(), null, null, null, user); this.graph.flush(); workQueueRepository.pushUserImageQueue(imageVertex.getId().toString()); >>>>>>> this.workspaceRepository.updateEntityOnWorkspace(workspace, artifactVertex.getId(), null, null, null, user); this.workspaceRepository.updateEntityOnWorkspace(workspace, entityVertex.getId(), null, null, null, user); graph.flush(); workQueueRepository.pushUserImageQueue(artifactVertex.getId().toString()); workQueueRepository.pushGraphPropertyQueue(artifactVertex.getId(), ElementMutation.DEFAULT_KEY, RawLumifyProperties.RAW.getKey()); <<<<<<< RawLumifyProperties.CREATE_DATE.setProperty(vertexBuilder, new Date(), lumifyVisibility.getVisibility()); RawLumifyProperties.FILE_NAME.setProperty(vertexBuilder, fileName, lumifyVisibility.getVisibility()); RawLumifyProperties.FILE_NAME_EXTENSION.setProperty(vertexBuilder, FilenameUtils.getExtension(fileName), lumifyVisibility.getVisibility()); RawLumifyProperties.MIME_TYPE.setProperty(vertexBuilder, mimeType, lumifyVisibility.getVisibility()); RawLumifyProperties.RAW.setProperty(vertexBuilder, rawValue, lumifyVisibility.getVisibility()); ======= LumifyVisibilityProperties.VISIBILITY_JSON_PROPERTY.setProperty(vertexBuilder, visibilityJson, lumifyVisibility.getVisibility()); LumifyProperties.TITLE.setProperty(vertexBuilder, title, metadata, lumifyVisibility.getVisibility()); RawLumifyProperties.CREATE_DATE.setProperty(vertexBuilder, new Date(), metadata, lumifyVisibility.getVisibility()); RawLumifyProperties.FILE_NAME.setProperty(vertexBuilder, fileName, metadata, lumifyVisibility.getVisibility()); RawLumifyProperties.FILE_NAME_EXTENSION.setProperty(vertexBuilder, FilenameUtils.getExtension(fileName), metadata, lumifyVisibility.getVisibility()); RawLumifyProperties.MIME_TYPE.setProperty(vertexBuilder, mimeType, metadata, lumifyVisibility.getVisibility()); RawLumifyProperties.RAW.setProperty(vertexBuilder, rawValue, metadata, lumifyVisibility.getVisibility()); OntologyLumifyProperties.CONCEPT_TYPE.setProperty(vertexBuilder, conceptId, metadata, lumifyVisibility.getVisibility()); EntityLumifyProperties.SOURCE.setProperty(vertexBuilder, SOURCE_UPLOAD, metadata, lumifyVisibility.getVisibility()); LumifyProperties.PROCESS.setProperty(vertexBuilder, PROCESS, metadata, lumifyVisibility.getVisibility()); >>>>>>> LumifyVisibilityProperties.VISIBILITY_JSON_PROPERTY.setProperty(vertexBuilder, visibilityJson, lumifyVisibility.getVisibility()); LumifyProperties.TITLE.setProperty(vertexBuilder, title, metadata, lumifyVisibility.getVisibility()); RawLumifyProperties.CREATE_DATE.setProperty(vertexBuilder, new Date(), metadata, lumifyVisibility.getVisibility()); RawLumifyProperties.FILE_NAME.setProperty(vertexBuilder, fileName, metadata, lumifyVisibility.getVisibility()); RawLumifyProperties.FILE_NAME_EXTENSION.setProperty(vertexBuilder, FilenameUtils.getExtension(fileName), metadata, lumifyVisibility.getVisibility()); RawLumifyProperties.MIME_TYPE.setProperty(vertexBuilder, mimeType, metadata, lumifyVisibility.getVisibility()); RawLumifyProperties.RAW.setProperty(vertexBuilder, rawValue, metadata, lumifyVisibility.getVisibility()); OntologyLumifyProperties.CONCEPT_TYPE.setProperty(vertexBuilder, conceptId, metadata, lumifyVisibility.getVisibility()); EntityLumifyProperties.SOURCE.setProperty(vertexBuilder, SOURCE_UPLOAD, metadata, lumifyVisibility.getVisibility()); LumifyProperties.PROCESS.setProperty(vertexBuilder, PROCESS, metadata, lumifyVisibility.getVisibility());
<<<<<<< import java.util.*; ======= import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent; import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFListener; import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty; >>>>>>> import java.util.*; import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFComponent; import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFListener; import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty; <<<<<<< * <h4>Events:</h4> * <table border="1" width="100%" cellpadding="3" summary=""> * <tr bgcolor="#CCCCFF" class="TableHeadingColor"> * <th align="left">Type</th> <th align="left">Phases</th> <th align="left">Description</th> * </tr> * <tr class="TableRowColor"> * <td valign="top"><code>javax.faces.event.ValueChangeEvent</code></td> * <td valign="top" nowrap></td> * <td valign="top">The valueChange event is delivered when the value attribute is changed.</td> * </tr> * </table> ======= >>>>>>>
<<<<<<< import com.altamiracorp.securegraph.Property; import com.google.common.collect.ImmutableMap; ======= import com.altamiracorp.securegraph.Graph; import com.google.inject.Inject; >>>>>>> import com.altamiracorp.securegraph.Graph; import com.altamiracorp.securegraph.Property; import com.google.inject.Inject;
<<<<<<< Method m = clazz.getMethod("handleExceptionList", new Class[] { FacesContext.class, Exception.class }); m.invoke(errorHandler, new Object[] { facesContext, li }); } catch (ClassNotFoundException ex) { throw new ServletException("Error-Handler : " + errorHandlerClass + " was not found. Fix your web.xml-parameter : " + ERROR_HANDLER_PARAMETER, ex); } catch (IllegalAccessException ex) { throw new ServletException("Constructor of error-Handler : " + errorHandlerClass + " is not accessible. Error-Handler is specified in web.xml-parameter : " + ERROR_HANDLER_PARAMETER, ex); } catch (InstantiationException ex) { throw new ServletException("Error-Handler : " + errorHandlerClass + " could not be instantiated. Error-Handler is specified in web.xml-parameter : " + ERROR_HANDLER_PARAMETER, ex); ======= Method m = clazz.getMethod("handleExceptionList", new Class[]{FacesContext.class,List.class}); m.invoke(errorHandler, new Object[]{facesContext, li}); >>>>>>> Method m = clazz.getMethod("handleExceptionList", new Class[]{FacesContext.class,List.class}); m.invoke(errorHandler, new Object[]{facesContext, li}); } catch (ClassNotFoundException ex) { throw new ServletException("Error-Handler : " + errorHandlerClass + " was not found. Fix your web.xml-parameter : " + ERROR_HANDLER_PARAMETER, ex); } catch (IllegalAccessException ex) { throw new ServletException("Constructor of error-Handler : " + errorHandlerClass + " is not accessible. Error-Handler is specified in web.xml-parameter : " + ERROR_HANDLER_PARAMETER, ex); } catch (InstantiationException ex) { throw new ServletException("Error-Handler : " + errorHandlerClass + " could not be instantiated. Error-Handler is specified in web.xml-parameter : " + ERROR_HANDLER_PARAMETER, ex);
<<<<<<< import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; ======= >>>>>>> import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; <<<<<<< import java.util.Set; ======= import java.util.concurrent.ConcurrentHashMap; >>>>>>> import java.util.Set; import java.util.concurrent.ConcurrentHashMap; <<<<<<< private String key(String componentFamily, String rendererType) { return componentFamily + "." + rendererType; } @Override public void addClientBehaviorRenderer(String type, ClientBehaviorRenderer renderer) { if (type == null) { throw new NullPointerException("client behavior renderer type must not be null"); } if ( renderer == null) { throw new NullPointerException("client behavior renderer must not be null"); } _clientBehaviorRenderers.put(type, renderer); } @Override public ClientBehaviorRenderer getClientBehaviorRenderer(String type) { if (type == null) { throw new NullPointerException("client behavior renderer type must not be null"); } return _clientBehaviorRenderers.get(type); } @Override public Iterator<String> getClientBehaviorRendererTypes() { return _clientBehaviorRenderers.keySet().iterator(); } @Override ======= >>>>>>> @Override public void addClientBehaviorRenderer(String type, ClientBehaviorRenderer renderer) { if (type == null) { throw new NullPointerException("client behavior renderer type must not be null"); } if ( renderer == null) { throw new NullPointerException("client behavior renderer must not be null"); } _clientBehaviorRenderers.put(type, renderer); } @Override public ClientBehaviorRenderer getClientBehaviorRenderer(String type) { if (type == null) { throw new NullPointerException("client behavior renderer type must not be null"); } return _clientBehaviorRenderers.get(type); } @Override public Iterator<String> getClientBehaviorRendererTypes() { return _clientBehaviorRenderers.keySet().iterator(); } @Override <<<<<<< String rendererKey = key(componentFamily, rendererType); if (_renderers.get(rendererKey) != null) { // this is not necessarily an error, but users do need to be // very careful about jar processing order when overriding // some component's renderer with an alternate renderer. log.debug("Overwriting renderer with family = " + componentFamily + " rendererType = " + rendererType + " renderer class = " + renderer.getClass().getName()); } if (_families.get(componentFamily) == null) { Set<String> rendererTypes = new HashSet<String>(); rendererTypes.add(rendererType); _families.put(componentFamily, rendererTypes); } else { _families.get(componentFamily).add(rendererType); } _renderers.put(rendererKey, renderer); ======= _put(componentFamily, rendererType, renderer); >>>>>>> _put(componentFamily, rendererType, renderer);
<<<<<<< return !resource.startsWith("/custom_") && !resource.equals("/terrain_nh.png") && !resource.equals("/terrain_s.png") && !resource.matches("^/mob/.*\\d+.png$") ; ======= return !resource.startsWith("/custom_") && !resource.equals("/terrain_nh.png") && !resource.equals("/terrain_s.png") && !resource.endsWith("_widths.txt") ; >>>>>>> return !resource.startsWith("/custom_") && !resource.equals("/terrain_nh.png") && !resource.equals("/terrain_s.png") && !resource.endsWith("_widths.txt") && !resource.matches("^/mob/.*\\d+.png$") ;
<<<<<<< public void pipeFile(final LogSource logSource, final ProfileListener listener) { ======= private Monitor() { // utility class } public static void pipeFile(final LogSource logSource, final ProfileListener listener) throws IOException { >>>>>>> private Monitor() { // utility class } public static void pipeFile(final LogSource logSource, final ProfileListener listener) { <<<<<<< public void consumeFile(final LogSource logSource, final ProfileListener listener) { ======= public static void consumeFile(final LogSource logSource, final ProfileListener listener) throws IOException { >>>>>>> public static void consumeFile(final LogSource logSource, final ProfileListener listener) { <<<<<<< private Conductor pipe(final LogSource logSource, final ProfileListener listener, final boolean continuous) { LogCollector collector = new LogCollector(listener, continuous); LogParser parser = new LogParser(getLogger(LogParser.class), collector); ======= private static Conductor pipe(final LogSource logSource, LogEventListener listener, final boolean continuous) { LogParser parser = new LogParser(getLogger(LogParser.class), listener); >>>>>>> private static Conductor pipe(final LogSource logSource, LogEventListener listener, final boolean continuous) { LogParser parser = new LogParser(getLogger(LogParser.class), listener);
<<<<<<< import static com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.COLUMN_SELF_PCT; import static com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.COLUMN_TOTAL_PCT; ======= import static com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.GENERAL_DEPTH; import static com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.GENERAL_SAMPLECOUNT; import static com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.GENERAL_THREAD; import static com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.GENERAL_UNKNOWN; >>>>>>> import static com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.COLUMN_SELF_PCT; import static com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.COLUMN_TOTAL_PCT; import static com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.GENERAL_DEPTH; import static com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.GENERAL_SAMPLECOUNT; import static com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.GENERAL_THREAD; import static com.insightfullogic.honest_profiler.ports.javafx.util.ResourceUtil.GENERAL_UNKNOWN;
<<<<<<< ======= >>>>>>> <<<<<<< private static SetupWizard wizard; private ViewDragHelper dragHelper; private int dragRange; private View dragContentView; private View topView; private int contentTop; private int topViewHeight; private boolean isRefreshing; private boolean shouldUpdateContentHeight; public static enum PanelState { EXPANDED, COLLAPSED, SLIDING ======= private static SetupWizard wizard; private ViewDragHelper dragHelper; private int dragRange; private View dragContentView; private View topView; private int contentTop; private int topViewHeight; private boolean isRefreshing; // Used for scrolling private float lastSlidingRatio = 0; private boolean dispatchingChildrenDownFaked = false; private boolean dispatchingChildrenContentView = false; private float dispatchingChildrenStartedAtY = Float.MAX_VALUE; private float dispatchingChildrenAtRatio = 0f; public static enum PanelState { EXPANDED, COLLAPSED, SLIDING } private PanelState panelState = PanelState.COLLAPSED; private boolean shouldIntercept = true; public DragTopLayout(Context context) { this(context, null); } public DragTopLayout(Context context, AttributeSet attrs) { this(context, attrs, 0); } public DragTopLayout(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); init(attrs); } private void init(AttributeSet attrs) { wizard = new SetupWizard(); dragHelper = ViewDragHelper.create(this, 1.0f, callback); // init from attrs TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.DragTopLayout); wizard.setCollapseOffset(a.getDimensionPixelSize(R.styleable.DragTopLayout_dtlCollapseOffset, wizard.collapseOffset)); wizard.setOverDrag(a.getBoolean(R.styleable.DragTopLayout_dtlOverDrag, wizard.overDrag)); wizard.initOpen = a.getBoolean(R.styleable.DragTopLayout_dtlOpen, wizard.initOpen); a.recycle(); } @Override protected void onFinishInflate() { super.onFinishInflate(); if (getChildCount() < 2) { throw new RuntimeException("Content view must contains two child views at least."); >>>>>>> private static SetupWizard wizard; private ViewDragHelper dragHelper; private int dragRange; private View dragContentView; private View topView; private int contentTop; private int topViewHeight; private boolean isRefreshing; // Used for scrolling private float lastSlidingRatio = 0; private boolean dispatchingChildrenDownFaked = false; private boolean dispatchingChildrenContentView = false; private float dispatchingChildrenStartedAtY = Float.MAX_VALUE; private float dispatchingChildrenAtRatio = 0f; public static enum PanelState { EXPANDED, COLLAPSED, SLIDING } private PanelState panelState = PanelState.COLLAPSED; private boolean shouldIntercept = true; public DragTopLayout(Context context) { this(context, null); } public DragTopLayout(Context context, AttributeSet attrs) { this(context, attrs, 0); } public DragTopLayout(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); init(attrs); } private void init(AttributeSet attrs) { wizard = new SetupWizard(); dragHelper = ViewDragHelper.create(this, 1.0f, callback); // init from attrs TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.DragTopLayout); wizard.setCollapseOffset(a.getDimensionPixelSize(R.styleable.DragTopLayout_dtlCollapseOffset, wizard.collapseOffset)); wizard.setOverDrag(a.getBoolean(R.styleable.DragTopLayout_dtlOverDrag, wizard.overDrag)); wizard.initOpen = a.getBoolean(R.styleable.DragTopLayout_dtlOpen, wizard.initOpen); a.recycle(); } @Override protected void onFinishInflate() { super.onFinishInflate(); if (getChildCount() < 2) { throw new RuntimeException("Content view must contains two child views at least."); <<<<<<< @Override public void onViewDragStateChanged(int state) { // 1 -> 2 -> 0 if (state == ViewDragHelper.STATE_IDLE) { // Change the panel state while the drag content view is idle. if (contentTop > getPaddingTop()) { panelState = PanelState.EXPANDED; } else { panelState = PanelState.COLLAPSED; } } else { panelState = PanelState.SLIDING; } if (wizard.panelListener != null) { wizard.panelListener.onPanelStateChanged(panelState); } super.onViewDragStateChanged(state); } }; ======= /** * Called while the ratio over refreshRatio. */ public void onRefresh(); } >>>>>>> /** * Called while the ratio over refreshRatio. */ public void onRefresh(); } <<<<<<< @Override public boolean onInterceptTouchEvent(MotionEvent ev) { try { // java.lang.NullPointerException: Attempt to read from null array // at android.support.v4.widget.ViewDragHelper.shouldInterceptTouchEvent(ViewDragHelper.java:1011) return shouldIntercept && dragHelper.shouldInterceptTouchEvent(ev); } catch (NullPointerException e) { e.printStackTrace(); } return false; ======= >>>>>>>
<<<<<<< import android.support.design.widget.FloatingActionButton; import android.support.v4.app.Fragment; ======= >>>>>>> import android.support.design.widget.FloatingActionButton; import android.support.v4.app.Fragment; <<<<<<< mBtnNextChallenge = (FloatingActionButton)findViewById(R.id.btnNextChallenge); ======= mBtnNextChallenge = (Button) findViewById(R.id.btnNextChallenge); mQuestionText = (TextView) findViewById(R.id.challengeQuestion); >>>>>>> mBtnNextChallenge = (FloatingActionButton)findViewById(R.id.btnNextChallenge); mQuestionText = (TextView) findViewById(R.id.challengeQuestion);
<<<<<<< import android.support.design.widget.TabLayout; import android.support.v4.view.ViewPager; ======= >>>>>>>
<<<<<<< ======= import com.altamiracorp.lumify.core.security.VisibilityTranslator; >>>>>>> import com.altamiracorp.lumify.core.security.VisibilityTranslator; <<<<<<< import com.altamiracorp.securegraph.Edge; import com.altamiracorp.securegraph.Graph; import com.altamiracorp.securegraph.Visibility; ======= import com.altamiracorp.securegraph.Edge; import com.altamiracorp.securegraph.ElementMutation; import com.altamiracorp.securegraph.Graph; >>>>>>> import com.altamiracorp.securegraph.Edge; import com.altamiracorp.securegraph.ElementMutation; import com.altamiracorp.securegraph.Graph; <<<<<<< import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject; ======= import org.json.JSONObject; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; >>>>>>> import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.json.JSONObject;
<<<<<<< import cn.nukkit.level.Sound; import cn.nukkit.level.chunk.Chunk; ======= import cn.nukkit.item.ItemBlock; import cn.nukkit.level.format.FullChunk; >>>>>>> import cn.nukkit.level.chunk.Chunk;
<<<<<<< import cn.nukkit.player.Player; ======= import cn.nukkit.utils.BlockColor; >>>>>>> import cn.nukkit.player.Player; import cn.nukkit.utils.BlockColor;
<<<<<<< // public static ImmutableMap<Integer, String> LEGACY_IDS = ImmutableMap.<Integer, String>builder() // .put(51, "minecraft:npc") // .put(Blaze.NETWORK_ID, "minecraft:blaze") // .put(CaveSpider.NETWORK_ID, "minecraft:cave_spider") // .put(Creeper.NETWORK_ID, "minecraft:creeper") // .put(Wolf.NETWORK_ID, "minecraft:wolf") // .put(Drowned.NETWORK_ID, "minecraft:drowned") // .put(Mooshroom.NETWORK_ID, "minecraft:mooshroom") // .put(Cow.NETWORK_ID, "minecraft:cow") // .put(Chicken.NETWORK_ID, "minecraft:chicken") // .put(107, "minecraft:balloon") // .put(Llama.NETWORK_ID, "minecraft:llama") // .put(20, "minecraft:iron_golem") // .put(Rabbit.NETWORK_ID, "minecraft:rabbit") // .put(21, "minecraft:snow_golem") // .put(100, "minecraft:command_block_minecart") // .put(61, "minecraft:armor_stand") // .put(DroppedItem.NETWORK_ID, "minecraft:item") // .put(Tnt.NETWORK_ID, "minecraft:tnt") // .put(FallingBlock.NETWORK_ID, "minecraft:falling_block") // .put(XpBottle.NETWORK_ID, "minecraft:xp_bottle") // .put(XpOrb.NETWORK_ID, "minecraft:xp_orb") // .put(70, "minecraft:eye_of_ender_signal") // .put(EnderCrystal.NETWORK_ID, "minecraft:ender_crystal") // .put(76, "minecraft:shulker_bullet") // .put(FishingHook.NETWORK_ID, "minecraft:fishing_hook") // .put(79, "minecraft:dragon_fireball") // .put(Arrow.NETWORK_ID, "minecraft:arrow") // .put(Snowball.NETWORK_ID, "minecraft:snowball") // .put(Egg.NETWORK_ID, "minecraft:egg") // .put(Painting.NETWORK_ID, "minecraft:painting") // .put(ThrownTrident.NETWORK_ID, "minecraft:thrown_trident") // .put(85, "minecraft:fireball") // .put(SplashPotion.NETWORK_ID, "minecraft:splash_potion") // .put(EnderPearl.NETWORK_ID, "minecraft:ender_pearl") // .put(88, "minecraft:leash_knot") // .put(89, "minecraft:wither_skull") // .put(91, "minecraft:wither_skull_dangerous") // .put(Boat.NETWORK_ID, "minecraft:boat") // .put(LightningBolt.NETWORK_ID, "minecraft:lightning_bolt") // .put(94, "minecraft:small_fireball") // .put(102, "minecraft:llama_spit") // .put(95, "minecraft:area_effect_cloud") // .put(101, "minecraft:lingering_potion") // .put(FireworksRocket.NETWORK_ID, "minecraft:fireworks_rocket") // .put(103, "minecraft:evocation_fang") // .put(104, "minecraft:evocation_illager") // .put(Vex.NETWORK_ID, "minecraft:vex") // .put(56, "minecraft:agent") // .put(106, "minecraft:ice_bomb") // .put(Phantom.NETWORK_ID, "minecraft:phantom") // .put(62, "minecraft:tripod_camera") // .put(Pillager.NETWORK_ID, "minecraft:pillager") // .put(WanderingTrader.NETWORK_ID, "minecraft:wandering_trader") // .put(Ravager.NETWORK_ID, "minecraft:ravager") // .put(DeprecatedVillager.NETWORK_ID, "minecraft:villager_v2") // .put(DeprecatedZombieVillager.NETWORK_ID, "minecraft:zombie_villager_v2") // .put(121, "minecraft:fox") // .build(); ======= public static ImmutableMap<Integer, String> LEGACY_IDS = ImmutableMap.<Integer, String>builder() .put(51, "minecraft:npc") .put(63, "minecraft:player") .put(EntityWitherSkeleton.NETWORK_ID, "minecraft:wither_skeleton") .put(EntityHusk.NETWORK_ID, "minecraft:husk") .put(EntityStray.NETWORK_ID, "minecraft:stray") .put(EntityWitch.NETWORK_ID, "minecraft:witch") .put(EntityZombieVillagerV1.NETWORK_ID, "minecraft:zombie_villager") .put(EntityBlaze.NETWORK_ID, "minecraft:blaze") .put(EntityMagmaCube.NETWORK_ID, "minecraft:magma_cube") .put(EntityGhast.NETWORK_ID, "minecraft:ghast") .put(EntityCaveSpider.NETWORK_ID, "minecraft:cave_spider") .put(EntitySilverfish.NETWORK_ID, "minecraft:silverfish") .put(EntityEnderman.NETWORK_ID, "minecraft:enderman") .put(EntitySlime.NETWORK_ID, "minecraft:slime") .put(EntityZombiePigman.NETWORK_ID, "minecraft:zombie_pigman") .put(EntitySpider.NETWORK_ID, "minecraft:spider") .put(EntitySkeleton.NETWORK_ID, "minecraft:skeleton") .put(EntityCreeper.NETWORK_ID, "minecraft:creeper") .put(EntityZombie.NETWORK_ID, "minecraft:zombie") .put(EntitySkeletonHorse.NETWORK_ID, "minecraft:skeleton_horse") .put(EntityMule.NETWORK_ID, "minecraft:mule") .put(EntityDonkey.NETWORK_ID, "minecraft:donkey") .put(EntityDolphin.NETWORK_ID, "minecraft:dolphin") .put(EntityTropicalFish.NETWORK_ID, "minecraft:tropicalfish") .put(EntityWolf.NETWORK_ID, "minecraft:wolf") .put(EntitySquid.NETWORK_ID, "minecraft:squid") .put(EntityDrowned.NETWORK_ID, "minecraft:drowned") .put(EntitySheep.NETWORK_ID, "minecraft:sheep") .put(EntityMooshroom.NETWORK_ID, "minecraft:mooshroom") .put(EntityPanda.NETWORK_ID, "minecraft:panda") .put(EntitySalmon.NETWORK_ID, "minecraft:salmon") .put(EntityPig.NETWORK_ID, "minecraft:pig") .put(EntityVillagerV1.NETWORK_ID, "minecraft:villager") .put(EntityCod.NETWORK_ID, "minecraft:cod") .put(EntityPufferfish.NETWORK_ID, "minecraft:pufferfish") .put(EntityCow.NETWORK_ID, "minecraft:cow") .put(EntityChicken.NETWORK_ID, "minecraft:chicken") .put(107, "minecraft:balloon") .put(EntityLlama.NETWORK_ID, "minecraft:llama") .put(20, "minecraft:iron_golem") .put(EntityRabbit.NETWORK_ID, "minecraft:rabbit") .put(21, "minecraft:snow_golem") .put(EntityBat.NETWORK_ID, "minecraft:bat") .put(EntityOcelot.NETWORK_ID, "minecraft:ocelot") .put(EntityHorse.NETWORK_ID, "minecraft:horse") .put(EntityCat.NETWORK_ID, "minecraft:cat") .put(EntityPolarBear.NETWORK_ID, "minecraft:polar_bear") .put(EntityZombieHorse.NETWORK_ID, "minecraft:zombie_horse") .put(EntityTurtle.NETWORK_ID, "minecraft:turtle") .put(EntityParrot.NETWORK_ID, "minecraft:parrot") .put(EntityGuardian.NETWORK_ID, "minecraft:guardian") .put(EntityElderGuardian.NETWORK_ID, "minecraft:elder_guardian") .put(EntityVindicator.NETWORK_ID, "minecraft:vindicator") .put(EntityWither.NETWORK_ID, "minecraft:wither") .put(EntityEnderDragon.NETWORK_ID, "minecraft:ender_dragon") .put(EntityShulker.NETWORK_ID, "minecraft:shulker") .put(EntityEndermite.NETWORK_ID, "minecraft:endermite") .put(EntityMinecartEmpty.NETWORK_ID, "minecraft:minecart") .put(EntityMinecartHopper.NETWORK_ID, "minecraft:hopper_minecart") .put(EntityMinecartTNT.NETWORK_ID, "minecraft:tnt_minecart") .put(EntityMinecartChest.NETWORK_ID, "minecraft:chest_minecart") .put(100, "minecraft:command_block_minecart") .put(61, "minecraft:armor_stand") .put(EntityItem.NETWORK_ID, "minecraft:item") .put(EntityPrimedTNT.NETWORK_ID, "minecraft:tnt") .put(EntityFallingBlock.NETWORK_ID, "minecraft:falling_block") .put(EntityExpBottle.NETWORK_ID, "minecraft:xp_bottle") .put(EntityXPOrb.NETWORK_ID, "minecraft:xp_orb") .put(70, "minecraft:eye_of_ender_signal") .put(EntityEndCrystal.NETWORK_ID, "minecraft:ender_crystal") .put(76, "minecraft:shulker_bullet") .put(EntityFishingHook.NETWORK_ID, "minecraft:fishing_hook") .put(79, "minecraft:dragon_fireball") .put(EntityArrow.NETWORK_ID, "minecraft:arrow") .put(EntitySnowball.NETWORK_ID, "minecraft:snowball") .put(EntityEgg.NETWORK_ID, "minecraft:egg") .put(EntityPainting.NETWORK_ID, "minecraft:painting") .put(EntityThrownTrident.NETWORK_ID, "minecraft:thrown_trident") .put(85, "minecraft:fireball") .put(EntityPotion.NETWORK_ID, "minecraft:splash_potion") .put(EntityEnderPearl.NETWORK_ID, "minecraft:ender_pearl") .put(88, "minecraft:leash_knot") .put(89, "minecraft:wither_skull") .put(91, "minecraft:wither_skull_dangerous") .put(EntityBoat.NETWORK_ID, "minecraft:boat") .put(EntityLightning.NETWORK_ID, "minecraft:lightning_bolt") .put(94, "minecraft:small_fireball") .put(102, "minecraft:llama_spit") .put(95, "minecraft:area_effect_cloud") .put(101, "minecraft:lingering_potion") .put(EntityFirework.NETWORK_ID, "minecraft:fireworks_rocket") .put(103, "minecraft:evocation_fang") .put(104, "minecraft:evocation_illager") .put(EntityVex.NETWORK_ID, "minecraft:vex") .put(56, "minecraft:agent") .put(106, "minecraft:ice_bomb") .put(EntityPhantom.NETWORK_ID, "minecraft:phantom") .put(62, "minecraft:tripod_camera") .put(EntityPillager.NETWORK_ID, "minecraft:pillager") .put(EntityWanderingTrader.NETWORK_ID, "minecraft:wandering_trader") .put(EntityRavager.NETWORK_ID, "minecraft:ravager") .put(EntityVillager.NETWORK_ID, "minecraft:villager_v2") .put(EntityZombieVillager.NETWORK_ID, "minecraft:zombie_villager_v2") .put(121, "minecraft:fox") .put(122, "minecraft:bee") .build(); >>>>>>> // public static ImmutableMap<Integer, String> LEGACY_IDS = ImmutableMap.<Integer, String>builder() // .put(51, "minecraft:npc") // .put(Blaze.NETWORK_ID, "minecraft:blaze") // .put(CaveSpider.NETWORK_ID, "minecraft:cave_spider") // .put(Creeper.NETWORK_ID, "minecraft:creeper") // .put(Wolf.NETWORK_ID, "minecraft:wolf") // .put(Drowned.NETWORK_ID, "minecraft:drowned") // .put(Mooshroom.NETWORK_ID, "minecraft:mooshroom") // .put(Cow.NETWORK_ID, "minecraft:cow") // .put(Chicken.NETWORK_ID, "minecraft:chicken") // .put(107, "minecraft:balloon") // .put(Llama.NETWORK_ID, "minecraft:llama") // .put(20, "minecraft:iron_golem") // .put(Rabbit.NETWORK_ID, "minecraft:rabbit") // .put(21, "minecraft:snow_golem") // .put(100, "minecraft:command_block_minecart") // .put(61, "minecraft:armor_stand") // .put(DroppedItem.NETWORK_ID, "minecraft:item") // .put(Tnt.NETWORK_ID, "minecraft:tnt") // .put(FallingBlock.NETWORK_ID, "minecraft:falling_block") // .put(XpBottle.NETWORK_ID, "minecraft:xp_bottle") // .put(XpOrb.NETWORK_ID, "minecraft:xp_orb") // .put(70, "minecraft:eye_of_ender_signal") // .put(EnderCrystal.NETWORK_ID, "minecraft:ender_crystal") // .put(76, "minecraft:shulker_bullet") // .put(FishingHook.NETWORK_ID, "minecraft:fishing_hook") // .put(79, "minecraft:dragon_fireball") // .put(Arrow.NETWORK_ID, "minecraft:arrow") // .put(Snowball.NETWORK_ID, "minecraft:snowball") // .put(Egg.NETWORK_ID, "minecraft:egg") // .put(Painting.NETWORK_ID, "minecraft:painting") // .put(ThrownTrident.NETWORK_ID, "minecraft:thrown_trident") // .put(85, "minecraft:fireball") // .put(SplashPotion.NETWORK_ID, "minecraft:splash_potion") // .put(EnderPearl.NETWORK_ID, "minecraft:ender_pearl") // .put(88, "minecraft:leash_knot") // .put(89, "minecraft:wither_skull") // .put(91, "minecraft:wither_skull_dangerous") // .put(Boat.NETWORK_ID, "minecraft:boat") // .put(LightningBolt.NETWORK_ID, "minecraft:lightning_bolt") // .put(94, "minecraft:small_fireball") // .put(102, "minecraft:llama_spit") // .put(95, "minecraft:area_effect_cloud") // .put(101, "minecraft:lingering_potion") // .put(FireworksRocket.NETWORK_ID, "minecraft:fireworks_rocket") // .put(103, "minecraft:evocation_fang") // .put(104, "minecraft:evocation_illager") // .put(Vex.NETWORK_ID, "minecraft:vex") // .put(56, "minecraft:agent") // .put(106, "minecraft:ice_bomb") // .put(Phantom.NETWORK_ID, "minecraft:phantom") // .put(62, "minecraft:tripod_camera") // .put(Pillager.NETWORK_ID, "minecraft:pillager") // .put(WanderingTrader.NETWORK_ID, "minecraft:wandering_trader") // .put(Ravager.NETWORK_ID, "minecraft:ravager") // .put(DeprecatedVillager.NETWORK_ID, "minecraft:villager_v2") // .put(DeprecatedZombieVillager.NETWORK_ID, "minecraft:zombie_villager_v2") // .put(121, "minecraft:fox") // .put(122, "minecraft:bee") // .build();
<<<<<<< this.containerRecipes.put(getItemHash(input.getId(), potion.getDamage()), recipe); ======= this.containerRecipes.put(getContainerHash(input.getId(), potion.getId()), recipe); >>>>>>> this.containerRecipes.put(getContainerHash(input.getId(), potion.getDamage()), recipe);
<<<<<<< import cn.nukkit.player.Player; ======= import cn.nukkit.utils.BlockColor; import cn.nukkit.utils.DyeColor; >>>>>>> import cn.nukkit.player.Player; import cn.nukkit.utils.BlockColor; import cn.nukkit.utils.DyeColor;
<<<<<<< import cn.nukkit.player.Player; ======= import cn.nukkit.nbt.tag.IntTag; import cn.nukkit.nbt.tag.Tag; >>>>>>> import cn.nukkit.nbt.tag.IntTag; import cn.nukkit.nbt.tag.Tag; import cn.nukkit.player.Player;
<<<<<<< import cn.nukkit.level.Level; ======= import cn.nukkit.utils.Color; >>>>>>> import cn.nukkit.level.Level; import cn.nukkit.utils.Color;
<<<<<<< import java.net.InetAddress; import java.net.InetSocketAddress; ======= import java.io.ByteArrayInputStream; import java.io.IOException; >>>>>>> import java.net.InetAddress; import java.net.InetSocketAddress; import java.io.ByteArrayInputStream; import java.io.IOException;
<<<<<<< import cn.nukkit.math.Vector3f; import cn.nukkit.player.Player; import cn.nukkit.utils.Identifier; import static cn.nukkit.block.BlockIds.LIT_REDSTONE_LAMP; import static cn.nukkit.block.BlockIds.REDSTONE_LAMP; ======= import cn.nukkit.utils.BlockColor; >>>>>>> import cn.nukkit.math.Vector3f; import cn.nukkit.player.Player; import cn.nukkit.utils.BlockColor; import cn.nukkit.utils.Identifier; import static cn.nukkit.block.BlockIds.LIT_REDSTONE_LAMP; import static cn.nukkit.block.BlockIds.REDSTONE_LAMP;
<<<<<<< protected int getBlockId(int x, int z, NukkitRandom random, Chunk chunk) { return TALL_GRASS << 4; ======= protected int getBlockId(int x, int z, NukkitRandom random, FullChunk chunk) { return (TALL_GRASS << 4) | 1; >>>>>>> protected int getBlockId(int x, int z, NukkitRandom random, Chunk chunk) { return (TALL_GRASS << 4) | 1;
<<<<<<< LightningBolt bolt = new LightningBolt(EntityTypes.LIGHTNING_BOLT, chunk, nbt); ======= EntityLightning bolt = (EntityLightning) Entity.createEntity("Lightning", chunk, nbt); if(bolt == null) return; >>>>>>> LightningBolt bolt = new LightningBolt(EntityTypes.LIGHTNING_BOLT, chunk, nbt); <<<<<<< if (item.getId() != AIR && item.getCount() > 0) { DroppedItem itemEntity = EntityRegistry.get().newEntity(EntityTypes.ITEM, this.getChunk((int) source.getX() >> 4, (int) source.getZ() >> 4), ======= if (item.getId() > 0 && item.getCount() > 0) { EntityItem itemEntity = (EntityItem) Entity.createEntity("Item", this.getChunk((int) source.getX() >> 4, (int) source.getZ() >> 4, true), >>>>>>> if (item.getId() != AIR && item.getCount() > 0) { DroppedItem itemEntity = EntityRegistry.get().newEntity(EntityTypes.ITEM, this.getChunk((int) source.getX() >> 4, (int) source.getZ() >> 4), <<<<<<< if (this.getGameRules().get(GameRules.DO_TILE_DROPS)) { int dropExp = target.getDropExp(); ======= if (this.gameRules.getBoolean(GameRule.DO_TILE_DROPS)) { >>>>>>> if (this.getGameRules().get(GameRules.DO_TILE_DROPS)) { <<<<<<< if (item instanceof ItemBucket && ((ItemBucket) item).getBlockIdFromDamage(item.getDamage()) == FLOWING_WATER) { player.getLevel().sendBlocks(new Player[]{player}, new Block[]{Block.get(AIR, 0, block.setLayer(1))}, UpdateBlockPacket.FLAG_ALL_PRIORITY); ======= if(item.getId() == ItemID.BUCKET && ItemBucket.getDamageByTarget(item.getDamage()) == BlockID.WATER) { player.getLevel().sendBlocks(new Player[]{player}, new Block[]{Block.get(Block.AIR, 0, target)}, UpdateBlockPacket.FLAG_ALL_PRIORITY, 1); >>>>>>> if (item.getId() == ItemIds.BUCKET && ItemBucket.getBlockIdFromDamage(item.getDamage()) == FLOWING_WATER) { player.getLevel().sendBlocks(new Player[]{player}, new Block[]{Block.get(AIR, 0, block.setLayer(1))}, UpdateBlockPacket.FLAG_ALL_PRIORITY); <<<<<<< if (item instanceof ItemBucket && ((ItemBucket) item).getBlockIdFromDamage(item.getDamage()) == FLOWING_WATER) { player.getLevel().sendBlocks(new Player[]{player}, new Block[]{Block.get(AIR, 0, target.setLayer(1))}, UpdateBlockPacket.FLAG_ALL_PRIORITY); ======= if(item.getId() == ItemID.BUCKET && ItemBucket.getDamageByTarget(item.getDamage()) == BlockID.WATER) { player.getLevel().sendBlocks(new Player[] {player}, new Block[] {Block.get(Block.AIR, 0, target)}, UpdateBlockPacket.FLAG_ALL_PRIORITY, 1); >>>>>>> if (item.getId() == ItemIds.BUCKET && ItemBucket.getBlockIdFromDamage(item.getDamage()) == FLOWING_WATER) { player.getLevel().sendBlocks(new Player[]{player}, new Block[]{Block.get(AIR, 0, target.setLayer(1))}, UpdateBlockPacket.FLAG_ALL_PRIORITY);
<<<<<<< String blockId = (String) recipe.get("block"); Identifier block = blockId == null ? null : Identifier.fromString(blockId); ======= Identifier craftingBlock = BlockIds.AIR; if (recipe.get("block") != null) { craftingBlock = Identifier.fromString((String) recipe.get("block")); } >>>>>>> String blockId = (String) recipe.get("block"); Identifier block = blockId == null ? null : Identifier.fromString(blockId); <<<<<<< ======= if (craftingBlock != BlockIds.CRAFTING_TABLE) { // Ignore other recipes than crafting table ones continue; } >>>>>>> <<<<<<< ======= if (craftingBlock != BlockIds.CRAFTING_TABLE) { // Ignore other recipes than crafting table ones continue; } >>>>>>> <<<<<<< ======= if (craftingBlock != BlockIds.FURNACE && craftingBlock != BlockIds.BLAST_FURNACE && craftingBlock != BlockIds.SMOKER && craftingBlock != BlockIds.CAMPFIRE) { // Ignore other recipes than furnaces continue; } >>>>>>> <<<<<<< this.registerRecipe(new FurnaceRecipe(resultItem, inputItem, block)); ======= this.registerRecipe(new FurnaceRecipe(resultItem, inputItem, craftingBlock)); >>>>>>> this.registerRecipe(new FurnaceRecipe(resultItem, inputItem, block));
<<<<<<< VertexBuilder builder = graph.prepareVertex(DEFAULT_VISIBILITY, getAuthorizations()); CONCEPT_TYPE.setProperty(builder, TYPE_RELATIONSHIP, DEFAULT_VISIBILITY); ONTOLOGY_TITLE.setProperty(builder, relationshipName, DEFAULT_VISIBILITY); DISPLAY_NAME.setProperty(builder, displayName, DEFAULT_VISIBILITY); ======= VertexBuilder builder = graph.prepareVertex(DEFAULT_VISIBILITY.getVisibility(), getAuthorizations()); CONCEPT_TYPE.setProperty(builder, TYPE_CONCEPT, DEFAULT_VISIBILITY.getVisibility()); ONTOLOGY_TITLE.setProperty(builder, relationshipName, DEFAULT_VISIBILITY.getVisibility()); DISPLAY_NAME.setProperty(builder, displayName, DEFAULT_VISIBILITY.getVisibility()); DISPLAY_TYPE.setProperty(builder, TYPE_RELATIONSHIP, DEFAULT_VISIBILITY.getVisibility()); >>>>>>> VertexBuilder builder = graph.prepareVertex(DEFAULT_VISIBILITY.getVisibility(), getAuthorizations()); CONCEPT_TYPE.setProperty(builder, TYPE_RELATIONSHIP, DEFAULT_VISIBILITY.getVisibility()); ONTOLOGY_TITLE.setProperty(builder, relationshipName, DEFAULT_VISIBILITY.getVisibility()); DISPLAY_NAME.setProperty(builder, displayName, DEFAULT_VISIBILITY.getVisibility()); <<<<<<< VertexBuilder builder = graph.prepareVertex(DEFAULT_VISIBILITY, getAuthorizations()); CONCEPT_TYPE.setProperty(builder, TYPE_PROPERTY, DEFAULT_VISIBILITY); ONTOLOGY_TITLE.setProperty(builder, propertyName, DEFAULT_VISIBILITY); DATA_TYPE.setProperty(builder, dataType.toString(), DEFAULT_VISIBILITY); ======= VertexBuilder builder = graph.prepareVertex(DEFAULT_VISIBILITY.getVisibility(), getAuthorizations()); CONCEPT_TYPE.setProperty(builder, TYPE_PROPERTY, DEFAULT_VISIBILITY.getVisibility()); DISPLAY_TYPE.setProperty(builder, TYPE_PROPERTY, DEFAULT_VISIBILITY.getVisibility()); ONTOLOGY_TITLE.setProperty(builder, propertyName, DEFAULT_VISIBILITY.getVisibility()); DATA_TYPE.setProperty(builder, dataType.toString(), DEFAULT_VISIBILITY.getVisibility()); >>>>>>> VertexBuilder builder = graph.prepareVertex(DEFAULT_VISIBILITY.getVisibility(), getAuthorizations()); CONCEPT_TYPE.setProperty(builder, TYPE_PROPERTY, DEFAULT_VISIBILITY.getVisibility()); ONTOLOGY_TITLE.setProperty(builder, propertyName, DEFAULT_VISIBILITY.getVisibility()); DATA_TYPE.setProperty(builder, dataType.toString(), DEFAULT_VISIBILITY.getVisibility());
<<<<<<< import cn.nukkit.math.Vector3f; import cn.nukkit.math.Vector3i; import cn.nukkit.player.Player; import cn.nukkit.utils.Identifier; import static cn.nukkit.block.BlockIds.UNLIT_REDSTONE_TORCH; ======= import cn.nukkit.math.Vector3; import cn.nukkit.utils.BlockColor; >>>>>>> import cn.nukkit.math.Vector3f; import cn.nukkit.math.Vector3i; import cn.nukkit.player.Player; import cn.nukkit.utils.BlockColor; import cn.nukkit.utils.Identifier; import static cn.nukkit.block.BlockIds.UNLIT_REDSTONE_TORCH;
<<<<<<< ======= import cn.nukkit.item.ItemBlock; import cn.nukkit.item.ItemBucket; >>>>>>> import cn.nukkit.item.ItemBlock; import cn.nukkit.item.ItemBucket; <<<<<<< updateBlockPacket.dataLayer = layer; ======= updateBlockPacket.dataLayer = dataLayer; >>>>>>> updateBlockPacket.dataLayer = dataLayer; <<<<<<< chunk.getEntities().forEach(Entity::scheduleUpdate); int tickSpeed = 3; ======= for (Entity entity : chunk.getEntities().values()) { entity.scheduleUpdate(); } int tickSpeed = gameRules.getInteger(GameRule.RANDOM_TICK_SPEED); >>>>>>> chunk.getEntities().forEach(Entity::scheduleUpdate); int tickSpeed = gameRules.getInteger(GameRule.RANDOM_TICK_SPEED); <<<<<<< this.sendBlocks(this.getChunkPlayers(cx, cz).toArray(new Player[0]), new Block[]{block}, UpdateBlockPacket.FLAG_ALL_PRIORITY); ======= this.sendBlocks(this.getChunkPlayers(cx, cz).values().toArray(new Player[0]), new Block[]{block}, UpdateBlockPacket.FLAG_ALL_PRIORITY); this.sendBlocks(this.getChunkPlayers(cx, cz).values().toArray(new Player[0]), new Block[]{Block.get(Block.AIR, 0, block)}, UpdateBlockPacket.FLAG_ALL_PRIORITY, 1); >>>>>>> this.sendBlocks(this.getChunkPlayers(cx, cz).toArray(new Player[0]), new Block[]{block}, UpdateBlockPacket.FLAG_ALL_PRIORITY); <<<<<<< @Nonnull public Set<Chunk> getChunks() { return this.chunkManager.getLoadedChunks(); ======= public void generateChunkCallback(int x, int z, BaseFullChunk chunk) { generateChunkCallback(x, z, chunk, true); } public void generateChunkCallback(int x, int z, BaseFullChunk chunk, boolean isPopulated) { Timings.generationCallbackTimer.startTiming(); long index = Level.chunkHash(x, z); if (this.chunkPopulationQueue.containsKey(index)) { FullChunk oldChunk = this.getChunk(x, z, false); for (int xx = -1; xx <= 1; ++xx) { for (int zz = -1; zz <= 1; ++zz) { this.chunkPopulationLock.remove(Level.chunkHash(x + xx, z + zz)); } } this.chunkPopulationQueue.remove(index); chunk.setProvider(this.provider); this.setChunk(x, z, chunk, false); chunk = this.getChunk(x, z, false); if (chunk != null && (oldChunk == null || !isPopulated) && chunk.isPopulated() && chunk.getProvider() != null) { this.server.getPluginManager().callEvent(new ChunkPopulateEvent(chunk)); for (ChunkLoader loader : this.getChunkLoaders(x, z)) { loader.onChunkPopulated(chunk); } } } else if (this.chunkGenerationQueue.containsKey(index) || this.chunkPopulationLock.containsKey(index)) { this.chunkGenerationQueue.remove(index); this.chunkPopulationLock.remove(index); chunk.setProvider(this.provider); this.setChunk(x, z, chunk, false); } else { chunk.setProvider(this.provider); this.setChunk(x, z, chunk, false); } Timings.generationCallbackTimer.stopTiming(); >>>>>>> @Nonnull public Set<Chunk> getChunks() { return this.chunkManager.getLoadedChunks();
<<<<<<< if (this.getMeta() >= 8) { if (!this.canFlowInto(this.level.getBlock((int) this.getX(), (int) this.getY(), (int) this.getZ() - 1)) || !this.canFlowInto(this.level.getBlock((int) this.getX(), (int) this.getY(), (int) this.getZ() + 1)) || !this.canFlowInto(this.level.getBlock((int) this.getX() - 1, (int) this.getY(), (int) this.getZ())) || !this.canFlowInto(this.level.getBlock((int) this.getX() + 1, (int) this.getY(), (int) this.getZ())) || !this.canFlowInto(this.level.getBlock((int) this.getX(), (int) this.getY() + 1, (int) this.getZ() - 1)) || !this.canFlowInto(this.level.getBlock((int) this.getX(), (int) this.getY() + 1, (int) this.getZ() + 1)) || !this.canFlowInto(this.level.getBlock((int) this.getX() - 1, (int) this.getY() + 1, (int) this.getZ())) || !this.canFlowInto(this.level.getBlock((int) this.getX() + 1, (int) this.getY() + 1, (int) this.getZ()))) { ======= if (this.getDamage() >= 8) { if (!this.canFlowInto(this.level.getBlock(this.x, this.y, this.z - 1)) || !this.canFlowInto(this.level.getBlock(this.x, this.y, this.z + 1)) || !this.canFlowInto(this.level.getBlock(this.x - 1, this.y, this.z)) || !this.canFlowInto(this.level.getBlock(this.x + 1, this.y, this.z)) || !this.canFlowInto(this.level.getBlock(this.x, this.y + 1, this.z - 1)) || !this.canFlowInto(this.level.getBlock(this.x, this.y + 1, this.z + 1)) || !this.canFlowInto(this.level.getBlock(this.x - 1, this.y + 1, this.z)) || !this.canFlowInto(this.level.getBlock(this.x + 1, this.y + 1, this.z))) { >>>>>>> if (this.getMeta() >= 8) { if (!this.canFlowInto(this.level.getBlock(this.getX(), this.getY(), this.getZ() - 1)) || !this.canFlowInto(this.level.getBlock(this.getX(), this.getY(), this.getZ() + 1)) || !this.canFlowInto(this.level.getBlock(this.getX() - 1, this.getY(), this.getZ())) || !this.canFlowInto(this.level.getBlock(this.getX() + 1, this.getY(), this.getZ())) || !this.canFlowInto(this.level.getBlock(this.getX(), this.getY() + 1, this.getZ() - 1)) || !this.canFlowInto(this.level.getBlock(this.getX(), this.getY() + 1, this.getZ() + 1)) || !this.canFlowInto(this.level.getBlock(this.getX() - 1, this.getY() + 1, this.getZ())) || !this.canFlowInto(this.level.getBlock(this.getX() + 1, this.getY() + 1, this.getZ()))) { <<<<<<< smallestFlowDecay = this.getSmallestFlowDecay(this.level.getBlock((int) this.getX(), (int) this.getY(), (int) this.getZ() - 1), smallestFlowDecay); smallestFlowDecay = this.getSmallestFlowDecay(this.level.getBlock((int) this.getX(), (int) this.getY(), (int) this.getZ() + 1), smallestFlowDecay); smallestFlowDecay = this.getSmallestFlowDecay(this.level.getBlock((int) this.getX() - 1, (int) this.getY(), (int) this.getZ()), smallestFlowDecay); smallestFlowDecay = this.getSmallestFlowDecay(this.level.getBlock((int) this.getX() + 1, (int) this.getY(), (int) this.getZ()), smallestFlowDecay); ======= smallestFlowDecay = this.getSmallestFlowDecay(this.getLiquidBlock(this.x, this.y, this.z - 1), smallestFlowDecay); smallestFlowDecay = this.getSmallestFlowDecay(this.getLiquidBlock(this.x, this.y, this.z + 1), smallestFlowDecay); smallestFlowDecay = this.getSmallestFlowDecay(this.getLiquidBlock(this.x - 1, this.y, this.z), smallestFlowDecay); smallestFlowDecay = this.getSmallestFlowDecay(this.getLiquidBlock(this.x + 1, this.y, this.z), smallestFlowDecay); >>>>>>> smallestFlowDecay = this.getSmallestFlowDecay(this.getLiquidBlock(this.getX(), this.getY(), this.getZ() - 1), smallestFlowDecay); smallestFlowDecay = this.getSmallestFlowDecay(this.getLiquidBlock(this.getX(), this.getY(), this.getZ() + 1), smallestFlowDecay); smallestFlowDecay = this.getSmallestFlowDecay(this.getLiquidBlock(this.getX() - 1, this.getY(), this.getZ()), smallestFlowDecay); smallestFlowDecay = this.getSmallestFlowDecay(this.getLiquidBlock(this.getX() + 1, this.getY(), this.getZ()), smallestFlowDecay); <<<<<<< int topFlowDecay = this.getFlowDecay(this.level.getBlock((int) this.getX(), (int) this.getY() + 1, (int) this.getZ())); ======= int topFlowDecay = this.getFlowDecay(this.getLiquidBlock(this.x, this.y + 1, this.z)); >>>>>>> int topFlowDecay = this.getFlowDecay(this.getLiquidBlock(this.getX(), this.getY() + 1, this.getZ())); <<<<<<< Block bottomBlock = this.level.getBlock((int) this.getX(), (int) this.getY() - 1, (int) this.getZ()); ======= Block bottomBlock = this.getLiquidBlock(this.x, this.y - 1, this.z); >>>>>>> Block bottomBlock = this.getLiquidBlock(this.getX(), this.getY() - 1, this.getZ()); <<<<<<< this.level.setBlock(this.getPosition(), to, true, true); ======= this.level.setBlock(this.getX(), this.getY(), this.getZ(), this.getLayer(), to, true, true); >>>>>>> this.level.setBlock(this.getX(), this.getY(), this.getZ(), this.getLayer(), to, true, true); <<<<<<< Block bottomBlock = this.level.getBlock((int) this.getX(), (int) this.getY() - 1, (int) this.getZ()); ======= Block bottomBlock = this.getLevel().getBlock(this.x, this.y - 1, this.z); >>>>>>> Block bottomBlock = this.getLevel().getBlock(this.getX(), this.getY() - 1, this.getZ()); <<<<<<< this.flowIntoBlock(this.level.getBlock((int) this.getX() - 1, (int) this.getY(), (int) this.getZ()), adjacentDecay); ======= this.flowIntoBlock(this.level.getBlock(this.x - 1, this.y, this.z), adjacentDecay); >>>>>>> this.flowIntoBlock(this.level.getBlock(this.getX() - 1, this.getY(), this.getZ()), adjacentDecay); <<<<<<< this.flowIntoBlock(this.level.getBlock((int) this.getX() + 1, (int) this.getY(), (int) this.getZ()), adjacentDecay); ======= this.flowIntoBlock(this.level.getBlock(this.x + 1, this.y, this.z), adjacentDecay); >>>>>>> this.flowIntoBlock(this.level.getBlock(this.getX() + 1, this.getY(), this.getZ()), adjacentDecay); <<<<<<< this.flowIntoBlock(this.level.getBlock((int) this.getX(), (int) this.getY(), (int) this.getZ() - 1), adjacentDecay); ======= this.flowIntoBlock(this.level.getBlock(this.x, this.y, this.z - 1), adjacentDecay); >>>>>>> this.flowIntoBlock(this.level.getBlock(this.getX(), this.getY(), this.getZ() - 1), adjacentDecay); <<<<<<< this.flowIntoBlock(this.level.getBlock((int) this.getX(), (int) this.getY(), (int) this.getZ() + 1), adjacentDecay); ======= this.flowIntoBlock(this.level.getBlock(this.x, this.y, this.z + 1), adjacentDecay); >>>>>>> this.flowIntoBlock(this.level.getBlock(this.getX(), this.getY(), this.getZ() + 1), adjacentDecay); <<<<<<< int x = (int) this.getX(); int y = (int) this.getY(); int z = (int) this.getZ(); ======= int x = this.x; int y = this.y; int z = this.z; >>>>>>> int x = this.getX(); int y = this.getY(); int z = this.getZ(); <<<<<<< return block.canBeFlooded() && !(block instanceof BlockLiquid && block.getMeta() == 0); ======= if (canBlockBeFlooded(block) && !(block instanceof BlockLiquid && block.getDamage() == 0)) { if (usesWaterLogging()) { Block layer1 = block.getBlockAtLayer(1); return !(layer1 instanceof BlockLiquid && layer1.getDamage() == 0); } return true; } return false; } private boolean canBlockBeFlooded(Block block) { return block.canBeFlooded() || (usesWaterLogging() && block.canWaterlogFlowing()); >>>>>>> if (canBlockBeFlooded(block) && !(block instanceof BlockLiquid && block.getMeta() == 0)) { if (usesWaterLogging()) { Block layer1 = block.layer(1); return !(layer1 instanceof BlockLiquid && layer1.getMeta() == 0); } return true; } return false; } private boolean canBlockBeFlooded(Block block) { return block.canBeFlooded() || (usesWaterLogging() && block.canWaterlogFlowing());
<<<<<<< import cn.nukkit.utils.Identifier; ======= import cn.nukkit.utils.BlockColor; >>>>>>> import cn.nukkit.utils.BlockColor; import cn.nukkit.utils.Identifier;
<<<<<<< public boolean onBreak(Item item) { this.getLevel().setBlock(this.getPosition(), Block.get(WATER), true); return true; ======= public boolean onBreak(Item item, Player player) { if (player.getGamemode() == Player.CREATIVE) { return this.getLevel().setBlock(this, Block.get(AIR), true); } if (down().isSolid()) { return this.getLevel().setBlock(this, Block.get(WATER), true); } else { return this.getLevel().setBlock(this, Block.get(AIR), true); } >>>>>>> public boolean onBreak(Item item, Player player) { if (player.getGamemode() == Player.CREATIVE) { return this.getLevel().setBlock(this.getPosition(), Block.get(AIR), true); } if (down().isSolid()) { return this.getLevel().setBlock(this.getPosition(), Block.get(WATER), true); } else { return this.getLevel().setBlock(this.getPosition(), Block.get(AIR), true); } <<<<<<< if (this.getLevel().getBlockLightAt((int) this.getX(), (int) this.getY(), (int) this.getZ()) >= 12) { ======= if (this.getLevel().getBlockLightAt(this.x, this.y, this.z) >= 12) { >>>>>>> if (this.getLevel().getBlockLightAt(this.getX(), this.getY(), this.getZ()) >= 12) {
<<<<<<< ======= @Override public Color getMapColor() { return Color.diamondColor; } >>>>>>> @Override public Color getMapColor() { return Color.diamondColor; }
<<<<<<< private class LoadingChunk implements Predicate<ChunkPos>, Function<ChunkPos, CompletableFuture<Chunk>> { ======= @ToString private class LoadingChunk { >>>>>>> @ToString private class LoadingChunk implements Predicate<ChunkPos>, Function<ChunkPos, CompletableFuture<Chunk>> { <<<<<<< if (this.generated) { Chunk chunk = this.getChunk(); if (chunk == null || !chunk.isGenerated()) { ======= if (generated) { Chunk chunk = getChunk(); if (chunk == null || chunk.isGenerated()) { >>>>>>> if (this.generated) { Chunk chunk = this.getChunk(); if (chunk == null || chunk.isGenerated()) { <<<<<<< if (this.populated) { Chunk chunk = this.getChunk(); if (chunk == null || !chunk.isPopulated()) { ======= this.generate(); // Generation has to happen before population if (populated) { Chunk chunk = getChunk(); if (chunk == null || chunk.isPopulated()) { >>>>>>> this.generate(); // Generation has to happen before population if (this.populated) { Chunk chunk = this.getChunk(); if (chunk == null || chunk.isPopulated()) {
<<<<<<< import cn.nukkit.utils.Identifier; import static cn.nukkit.block.BlockIds.STONE_SLAB2; ======= import cn.nukkit.utils.BlockColor; >>>>>>> import cn.nukkit.utils.BlockColor; import cn.nukkit.utils.Identifier; import static cn.nukkit.block.BlockIds.STONE_SLAB2;
<<<<<<< this.getLevel().setBlock(this.getPosition(), Block.get(AIR), true, true); this.getLevel().addSound(this.getPosition(), Sound.BLOCK_ITEMFRAME_REMOVE_ITEM); ======= super.onBreak(item); this.getLevel().addSound(this.asVector3f(), Sound.BLOCK_ITEMFRAME_REMOVE_ITEM); >>>>>>> super.onBreak(item); this.getLevel().addSound(this.getPosition(), Sound.BLOCK_ITEMFRAME_REMOVE_ITEM);
<<<<<<< import com.nukkitx.math.vector.Vector3f; import lombok.val; import org.cloudburstmc.server.block.Block; import org.cloudburstmc.server.block.BlockCategory; import org.cloudburstmc.server.block.BlockState; import org.cloudburstmc.server.block.BlockTraits; import org.cloudburstmc.server.block.trait.EnumBlockTrait; import org.cloudburstmc.server.item.behavior.Item; import org.cloudburstmc.server.item.behavior.ItemTool; import org.cloudburstmc.server.level.Level; import org.cloudburstmc.server.math.Direction; import org.cloudburstmc.server.math.Direction.Plane; import org.cloudburstmc.server.player.Player; import org.cloudburstmc.server.utils.data.WallConnectionType; import java.util.EnumMap; import java.util.Map; ======= import com.nukkitx.math.vector.Vector3f; import lombok.val; import org.cloudburstmc.server.block.Block; import org.cloudburstmc.server.block.BlockCategory; import org.cloudburstmc.server.block.BlockState; import org.cloudburstmc.server.block.BlockTraits; import org.cloudburstmc.server.block.trait.EnumBlockTrait; import org.cloudburstmc.server.item.Item; import org.cloudburstmc.server.item.ItemTool; import org.cloudburstmc.server.level.Level; import org.cloudburstmc.server.math.Direction; import org.cloudburstmc.server.math.Direction.Plane; import org.cloudburstmc.server.player.Player; import org.cloudburstmc.server.utils.data.WallConnectionType; import java.util.EnumMap; import java.util.Map; >>>>>>> import com.nukkitx.math.vector.Vector3f; import lombok.val; import org.cloudburstmc.server.block.Block; import org.cloudburstmc.server.block.BlockCategory; import org.cloudburstmc.server.block.BlockState; import org.cloudburstmc.server.block.BlockTraits; import org.cloudburstmc.server.block.trait.EnumBlockTrait; import org.cloudburstmc.server.level.Level; import org.cloudburstmc.server.math.Direction; import org.cloudburstmc.server.math.Direction.Plane; import org.cloudburstmc.server.player.Player; import org.cloudburstmc.server.utils.data.WallConnectionType; import java.util.EnumMap; import java.util.Map;
<<<<<<< import cn.nukkit.player.Player; import cn.nukkit.utils.Identifier; ======= import cn.nukkit.utils.BlockColor; >>>>>>> import cn.nukkit.player.Player; import cn.nukkit.utils.BlockColor; import cn.nukkit.utils.Identifier; <<<<<<< ======= @Override public int getFullId() { return this.getId() << 4; } @Override public void setDamage(int meta) { } @Override public BlockColor getColor() { return BlockColor.SPRUCE_BLOCK_COLOR; } >>>>>>> @Override public BlockColor getColor() { return BlockColor.SPRUCE_BLOCK_COLOR; }
<<<<<<< import net.daporkchop.lib.random.impl.ThreadLocalPRandom; ======= import com.nukkitx.math.vector.Vector3f; import com.nukkitx.math.vector.Vector3i; >>>>>>> import com.nukkitx.math.vector.Vector3f; import com.nukkitx.math.vector.Vector3i; import net.daporkchop.lib.random.impl.ThreadLocalPRandom; <<<<<<< switch (this.getDamage() & 0x07) { //porktodo: fix the rest of these /*case JUNGLE: ======= switch (this.getMeta() & 0x07) { case JUNGLE: >>>>>>> switch (this.getMeta() & 0x07) { //porktodo: fix the rest of these /*case JUNGLE: <<<<<<< feature = TreeSpecies.fromSaplingDamage(this.getDamage()).getDefaultGenerator(); ======= ObjectTree.growTree(this.level, this.getX(), this.getY(), this.getZ(), new BedrockRandom(), this.getMeta() & 0x07); return; >>>>>>> feature = TreeSpecies.fromSaplingDamage(this.getMeta()).getDefaultGenerator(); <<<<<<< if (!feature.place(this.level, ThreadLocalPRandom.current(), this.x + x, this.y, this.z + z)) { ======= if (!generator.generate(this.level, new BedrockRandom(), this.getPosition().add(x, 0, z))) { >>>>>>> if (!feature.place(this.level, ThreadLocalPRandom.current(), this.getX() + x, this.getY(), this.getZ() + z)) {
<<<<<<< import cn.nukkit.entity.EntityTypes; import cn.nukkit.entity.vehicle.ChestMinecart; ======= import cn.nukkit.entity.Entity; import cn.nukkit.entity.item.EntityMinecartChest; >>>>>>> import cn.nukkit.entity.EntityTypes; import cn.nukkit.entity.vehicle.ChestMinecart; <<<<<<< ChestMinecart minecart = EntityRegistry.get().newEntity(EntityTypes.CHEST_MINECART, level.getChunk(target.getChunkX(), target.getChunkZ()), new CompoundTag("") .putList(new ListTag<>("Pos") .add(new DoubleTag("", target.getX() + 0.5)) .add(new DoubleTag("", target.getY() + 0.0625D + adjacent)) .add(new DoubleTag("", target.getZ() + 0.5))) .putList(new ListTag<>("Motion") .add(new DoubleTag("", 0)) .add(new DoubleTag("", 0)) .add(new DoubleTag("", 0))) .putList(new ListTag<>("Rotation") .add(new FloatTag("", 0)) .add(new FloatTag("", 0))) ======= EntityMinecartChest minecart = (EntityMinecartChest) Entity.createEntity("MinecartChest", level.getChunk(target.getFloorX() >> 4, target.getFloorZ() >> 4), new CompoundTag("") .putList(new ListTag<>("Pos") .add(new DoubleTag("", target.getX() + 0.5)) .add(new DoubleTag("", target.getY() + 0.0625D + adjacent)) .add(new DoubleTag("", target.getZ() + 0.5))) .putList(new ListTag<>("Motion") .add(new DoubleTag("", 0)) .add(new DoubleTag("", 0)) .add(new DoubleTag("", 0))) .putList(new ListTag<>("Rotation") .add(new FloatTag("", 0)) .add(new FloatTag("", 0))) >>>>>>> ChestMinecart minecart = EntityRegistry.get().newEntity(EntityTypes.CHEST_MINECART, level.getChunk(target.getChunkX(), target.getChunkZ()), new CompoundTag("") .putList(new ListTag<>("Pos") .add(new DoubleTag("", target.getX() + 0.5)) .add(new DoubleTag("", target.getY() + 0.0625D + adjacent)) .add(new DoubleTag("", target.getZ() + 0.5))) .putList(new ListTag<>("Motion") .add(new DoubleTag("", 0)) .add(new DoubleTag("", 0)) .add(new DoubleTag("", 0))) .putList(new ListTag<>("Rotation") .add(new FloatTag("", 0)) .add(new FloatTag("", 0))) <<<<<<< decrementCount(); ======= >>>>>>> decrementCount();
<<<<<<< import cn.nukkit.utils.Identifier; ======= import cn.nukkit.utils.BlockColor; >>>>>>> import cn.nukkit.utils.BlockColor; import cn.nukkit.utils.Identifier; <<<<<<< ======= @Override public String getName() { return "Purpur Stairs"; } @Override public BlockColor getColor() { return BlockColor.MAGENTA_BLOCK_COLOR; } >>>>>>> @Override public BlockColor getColor() { return BlockColor.MAGENTA_BLOCK_COLOR; }
<<<<<<< public abstract class DataPacket extends BinaryStream { ======= public abstract class DataPacket extends BinaryStream implements Cloneable { >>>>>>> public abstract class DataPacket implements Cloneable { public int offset = 0; public byte[] buffer = new byte[0]; <<<<<<< @Override public void reset() { super.reset(); putByte(pid()); ======= @Override public void reset() { super.reset(); this.putByte(this.pid()); >>>>>>> protected void reset() { this.buffer = new byte[]{this.pid()}; this.offset = 0; <<<<<<< ======= public DataPacket clean() { this.setBuffer(null); this.isEncoded = false; this.offset = 0; return this; } >>>>>>> public DataPacket clean() { this.setBuffer(null); this.isEncoded = false; this.offset = 0; return this; }
<<<<<<< int width = container.getWidth(); int height = container.getHeight(); // set the cursor try { // hide the native cursor int min = Cursor.getMinCursorSize(); IntBuffer tmp = BufferUtils.createIntBuffer(min * min); Cursor emptyCursor = new Cursor(min, min, min/2, min/2, 1, tmp, null); container.setMouseCursor(emptyCursor, 0, 0); } catch (LWJGLException e) { ErrorHandler.error("Failed to set the cursor.", e, true); } GameImage.init(width, height); ======= >>>>>>> GameImage.init(width, height);
<<<<<<< public static void drawResultScrollbar(Graphics g, float position, float total) { UI.drawScrollbar(g, position, total, maxResultsShown * buttonOffset, buttonBaseX, buttonBaseY, buttonWidth * 1.01f, (maxResultsShown-1) * buttonOffset + buttonHeight, BG_NORMAL, Color.white, true); ======= public static void drawResultScrollbar(Graphics g, int index, int total) { UI.drawScrollbar(g, index, total, maxResultsShown, buttonBaseX, buttonBaseY, buttonWidth * 1.01f, buttonHeight, buttonOffset, Colors.BLACK_BG_NORMAL, Color.white, true); >>>>>>> public static void drawResultScrollbar(Graphics g, float position, float total) { UI.drawScrollbar(g, position, total, maxResultsShown * buttonOffset, buttonBaseX, buttonBaseY, buttonWidth * 1.01f, (maxResultsShown-1) * buttonOffset + buttonHeight, Colors.BLACK_BG_NORMAL, Color.white, true); <<<<<<< public static void drawDownloadScrollbar(Graphics g, float index, float total) { UI.drawScrollbar(g, index, total, maxDownloadsShown * infoHeight, infoBaseX, infoBaseY, infoWidth, maxDownloadsShown * infoHeight, BG_NORMAL, Color.white, true); ======= public static void drawDownloadScrollbar(Graphics g, int index, int total) { UI.drawScrollbar(g, index, total, maxDownloadsShown, infoBaseX, infoBaseY, infoWidth, infoHeight, infoHeight, Colors.BLACK_BG_NORMAL, Color.white, true); >>>>>>> public static void drawDownloadScrollbar(Graphics g, float index, float total) { UI.drawScrollbar(g, index, total, maxDownloadsShown * infoHeight, infoBaseX, infoBaseY, infoWidth, maxDownloadsShown * infoHeight, Colors.BLACK_BG_NORMAL, Color.white, true); <<<<<<< if (Options.useUnicodeMetadata()) // load glyphs Utils.loadGlyphs(Utils.FONT_BOLD, getTitle(), getArtist()); // TODO can't set clip again or else old clip will be cleared //g.setClip((int) textX, (int) (y + marginY), (int) (edgeX - textX - Utils.FONT_DEFAULT.getWidth(creator)), Utils.FONT_BOLD.getLineHeight()); Utils.FONT_BOLD.drawString( ======= if (Options.useUnicodeMetadata()) { // load glyphs Fonts.loadGlyphs(Fonts.BOLD, getTitle()); Fonts.loadGlyphs(Fonts.BOLD, getArtist()); } g.setClip((int) textX, (int) (y + marginY), (int) (edgeX - textX - Fonts.DEFAULT.getWidth(creator)), Fonts.BOLD.getLineHeight()); Fonts.BOLD.drawString( >>>>>>> if (Options.useUnicodeMetadata()) { // load glyphs Fonts.loadGlyphs(Fonts.BOLD, getTitle()); Fonts.loadGlyphs(Fonts.BOLD, getArtist()); } // TODO can't set clip again or else old clip will be cleared //g.setClip((int) textX, (int) (y + marginY), (int) (edgeX - textX - Fonts.DEFAULT.getWidth(creator)), Fonts.BOLD.getLineHeight()); Fonts.BOLD.drawString( <<<<<<< //g.clearClip(); Utils.FONT_DEFAULT.drawString( textX, y + marginY + Utils.FONT_BOLD.getLineHeight(), ======= g.clearClip(); Fonts.DEFAULT.drawString( textX, y + marginY + Fonts.BOLD.getLineHeight(), >>>>>>> //g.clearClip(); Fonts.DEFAULT.drawString( textX, y + marginY + Fonts.BOLD.getLineHeight(), <<<<<<< public void drawDownload(Graphics g, float position, int id, boolean hover) { ======= public void drawDownload(Graphics g, int index, int id, boolean hover) { Download download = this.download; // in case clearDownload() is called asynchronously >>>>>>> public void drawDownload(Graphics g, float position, int id, boolean hover) { Download download = this.download; // in case clearDownload() is called asynchronously
<<<<<<< ======= /** The current tick time for the follow circle expanding animation. */ private int tickExpandTime = 0; /** The duration of the follow circle expanding animation on ticks. */ private static final int TICK_EXPAND_TIME = 200; >>>>>>> /** The current tick time for the follow circle expanding animation. */ private int tickExpandTime = 0; /** The duration of the follow circle expanding animation on ticks. */ private static final int TICK_EXPAND_TIME = 200; <<<<<<< float curveAlpha = 1f; if (GameMod.HIDDEN.isActive() && trackPosition > getTime()) { curveAlpha = Math.max(0f, 1f - ((float) (trackPosition - getTime()) / (getEndTime() - getTime())) * 1.05f); ======= float oldWhiteFadeAlpha = Colors.WHITE_FADE.a; float sliderAlpha = 1f; if (GameMod.HIDDEN.isActive() && trackPosition > hitObject.getTime()) { // "hidden" mod: fade out sliders Colors.WHITE_FADE.a = color.a = sliderAlpha = Math.max(0f, 1f - ((float) (trackPosition - hitObject.getTime()) / (getEndTime() - hitObject.getTime())) * 1.05f); >>>>>>> float curveAlpha = 1f; if (GameMod.HIDDEN.isActive() && trackPosition > getTime()) { curveAlpha = Math.max(0f, 1f - ((float) (trackPosition - getTime()) / (getEndTime() - getTime())) * 1.05f); <<<<<<< drawSliderTicks(g, trackPosition, curveAlpha, decorationsAlpha, mirror); Colors.WHITE_FADE.a = alpha; } g.pushTransform(); if (mirror) { g.rotate(x, y, -180f); ======= drawSliderTicks(g, trackPosition, sliderAlpha, decorationsAlpha); Colors.WHITE_FADE.a = oldWhiteFadeAlpha; >>>>>>> drawSliderTicks(g, trackPosition, curveAlpha, decorationsAlpha, mirror); Colors.WHITE_FADE.a = alpha; } g.pushTransform(); if (mirror) { g.rotate(x, y, -180f); <<<<<<< if (!sliderClickedInitial) { data.drawSymbolNumber(hitObject.getComboNumber(), x, y, hitCircle.getWidth() * 0.40f / data.getDefaultSymbolImage(0).getHeight(), alpha); if (overlayAboveNumber) hitCircleOverlay.drawCentered(x, y, Colors.WHITE_FADE); ======= if (overlayAboveNumber) { oldWhiteFadeAlpha = Colors.WHITE_FADE.a; Colors.WHITE_FADE.a = sliderAlpha; hitCircleOverlay.drawCentered(x, y, Colors.WHITE_FADE); Colors.WHITE_FADE.a = oldWhiteFadeAlpha; >>>>>>> if (!sliderClickedInitial) { data.drawSymbolNumber(hitObject.getComboNumber(), x, y, hitCircle.getWidth() * 0.40f / data.getDefaultSymbolImage(0).getHeight(), alpha); if (overlayAboveNumber) hitCircleOverlay.drawCentered(x, y, Colors.WHITE_FADE); <<<<<<< //float colorLuminance = 0.299f*color.r + 0.587f*color.g + 0.114f*color.b; //Color arrowColor = colorLuminance < 0.8f ? Color.white : Color.black; Color arrowColor = Color.white; ======= // bouncing animation //arrow = arrow.getScaledCopy((float) (1 + 0.2d * ((trackPosition + sliderTime * tcurRepeat) % 292) / 292)); float colorLuminance = 0.299f*color.r + 0.587f*color.g + 0.114f*color.b; Color arrowColor = colorLuminance < 0.8f ? Color.white : Color.black; >>>>>>> //float colorLuminance = 0.299f*color.r + 0.587f*color.g + 0.114f*color.b; //Color arrowColor = colorLuminance < 0.8f ? Color.white : Color.black; Color arrowColor = Color.white; <<<<<<< GameImage.SLIDER_FOLLOWCIRCLE.getImage().getScaledCopy(1f + (tickExpand / (float) TICKEXPAND) * 0.1f).drawCentered(c.x, c.y); ======= float followCircleScale = 1f + (tickExpandTime / (float) TICK_EXPAND_TIME) * 0.1f; GameImage.SLIDER_FOLLOWCIRCLE.getImage().getScaledCopy(followCircleScale).drawCentered(c.x, c.y); >>>>>>> float followCircleScale = 1f + (tickExpandTime / (float) TICK_EXPAND_TIME) * 0.1f; GameImage.SLIDER_FOLLOWCIRCLE.getImage().getScaledCopy(followCircleScale).drawCentered(c.x, c.y); <<<<<<< private void drawSliderTicks(Graphics g, int trackPosition, float curveAlpha, float decorationsAlpha, boolean mirror) { ======= /** * Draws slider ticks. * @param g the graphics context * @param trackPosition the track position * @param curveAlpha the curve alpha level * @param decorationsAlpha the decorations alpha level */ private void drawSliderTicks(Graphics g, int trackPosition, float curveAlpha, float decorationsAlpha) { >>>>>>> /** * Draws slider ticks. * @param g the graphics context * @param trackPosition the track position * @param curveAlpha the curve alpha level * @param decorationsAlpha the decorations alpha level */ private void drawSliderTicks(Graphics g, int trackPosition, float curveAlpha, float decorationsAlpha, boolean mirror) { <<<<<<< tickExpand = TICKEXPAND; ======= tickExpandTime = TICK_EXPAND_TIME; >>>>>>> tickExpandTime = TICK_EXPAND_TIME; <<<<<<< //tickIntervals++; tickExpand = TICKEXPAND; isNewRepeat = true; ======= >>>>>>> <<<<<<< tickExpand = TICKEXPAND; ======= >>>>>>>
<<<<<<< import yugecin.opsudance.ui.nodelist.NodeList; import yugecin.opsudance.utils.Stack; ======= import yugecin.opsudance.ui.cursor.colors.CursorColor; >>>>>>> import yugecin.opsudance.ui.cursor.colors.CursorColor; import yugecin.opsudance.ui.nodelist.NodeList; import yugecin.opsudance.utils.Stack; <<<<<<< songHistory = new Stack<>(); nextSongs = new Stack<>(); JarFile jarfile = getJarfile(); ======= >>>>>>>
<<<<<<< MUSIC_PLAY ("music-play", "png", false, false), MUSIC_PAUSE ("music-pause", "png", false, false), MUSIC_NEXT ("music-next", "png", false, false), MUSIC_PREVIOUS ("music-previous", "png", false, false), RANKING_RETRY ("ranking-retry", "png", false, false), RANKING_EXIT ("ranking-back", "png", false, false), ======= MUSIC_PLAY ("music-play", "png", false, false) { @Override protected Image process_sub(Image img, int w, int h) { return img.getScaledCopy((h / 18f) / img.getHeight()); } }, MUSIC_PAUSE ("music-pause", "png", false, false) { @Override protected Image process_sub(Image img, int w, int h) { return MUSIC_PLAY.process_sub(img, w, h); } }, MUSIC_NEXT ("music-next", "png", false, false) { @Override protected Image process_sub(Image img, int w, int h) { return MUSIC_PLAY.process_sub(img, w, h); } }, MUSIC_PREVIOUS ("music-previous", "png", false, false) { @Override protected Image process_sub(Image img, int w, int h) { return MUSIC_PLAY.process_sub(img, w, h); } }, >>>>>>> MUSIC_PLAY ("music-play", "png", false, false), MUSIC_PAUSE ("music-pause", "png", false, false), MUSIC_NEXT ("music-next", "png", false, false), MUSIC_PREVIOUS ("music-previous", "png", false, false),
<<<<<<< if (isLeadIn()) { // stop updating during song lead-in leadInTime -= delta; if (!isLeadIn()) MusicController.resume(); return; } int trackPosition = MusicController.getPosition(); if (!isReplay) { ======= if (GameMod.AUTO.isActive() || GameMod.AUTOPILOT.isActive()) { mouseX = autoMouseX; mouseY = autoMouseY; } else if (!isReplay) { >>>>>>> if (isLeadIn()) { // stop updating during song lead-in leadInTime -= delta; if (!isLeadIn()) MusicController.resume(); return; } int trackPosition = MusicController.getPosition(); if (GameMod.AUTO.isActive() || GameMod.AUTOPILOT.isActive()) { mouseX = autoMouseX; mouseY = autoMouseY; frameAndRun(mouseX, mouseY, lastKeysPressed, trackPosition); } else if (!isReplay) { <<<<<<< Replay r = data.getReplay(replayFrames.toArray(new ReplayFrame[replayFrames.size()]), osu); if (r != null) ======= Replay r = data.getReplay(replayFrames.toArray(new ReplayFrame[replayFrames.size()])); if (r != null && !unranked) >>>>>>> Replay r = data.getReplay(replayFrames.toArray(new ReplayFrame[replayFrames.size()]), osu); if (r != null && !unranked) <<<<<<< ======= // "autopilot" mod: ignore actual cursor coordinates int cx, cy; if (GameMod.AUTOPILOT.isActive()) { cx = autoMouseX; cy = autoMouseY; } else { cx = x; cy = y; } if (!isReplay) addReplayFrame(cx, cy, lastKeysPressed | keys); >>>>>>> // "autopilot" mod: ignore actual cursor coordinates int cx, cy; if (GameMod.AUTOPILOT.isActive()) { cx = autoMouseX; cy = autoMouseY; } else { cx = x; cy = y; } <<<<<<< if (hitObject.isCircle() && hitObjects[objectIndex].mousePressed(x, y, trackPosition)) ======= if (hitObject.isCircle() && hitObjects[objectIndex].mousePressed(cx, cy)) >>>>>>> if (hitObject.isCircle() && hitObjects[objectIndex].mousePressed(cx, cy, trackPosition)) <<<<<<< hitObjects[objectIndex].mousePressed(x, y, trackPosition); ======= hitObjects[objectIndex].mousePressed(cx, cy); >>>>>>> hitObjects[objectIndex].mousePressed(cx, cy, trackPosition); <<<<<<< ======= // run frame updates in another thread killReplayThread(); replayThread = new Thread() { @Override public void run() { while (replayThreadRunning) { // update frames int trackPosition = MusicController.getPosition(); while (replayIndex < replay.frames.length && trackPosition >= replay.frames[replayIndex].getTime()) { ReplayFrame frame = replay.frames[replayIndex]; replayX = frame.getScaledX(); replayY = frame.getScaledY(); replayKeyPressed = frame.isKeyPressed(); int keys = frame.getKeys(); if (replayKeyPressed && keys != replayKeys) // send a key press gameKeyPressed(frame.getKeys(), replayX, replayY); replayKeys = keys; replayIndex++; } // out of frames if (replayIndex >= replay.frames.length) break; // sleep execution try { int diff = replay.frames[replayIndex].getTime() - trackPosition - 1; if (diff < 1) Thread.sleep(0, 256000); else Thread.sleep(diff); } catch (InterruptedException e) {} } } }; if (!GameMod.AUTO.isActive()) { // "auto" mod: ignore replay frames replayThreadRunning = true; replayThread.start(); } >>>>>>> <<<<<<< UI.hideCursor(); ======= killReplayThread(); >>>>>>>
<<<<<<< if (!Options.noSingleInstance()) { try { SERVER_SOCKET = new ServerSocket(Options.getPort(), 1, InetAddress.getLocalHost()); } catch (UnknownHostException e) { // shouldn't happen } catch (IOException e) { ErrorHandler.error(String.format( ======= try { SERVER_SOCKET = new ServerSocket(Options.getPort(), 1, InetAddress.getLocalHost()); } catch (UnknownHostException e) { // shouldn't happen } catch (IOException e) { errorAndExit( null, String.format( >>>>>>> if (!Options.noSingleInstance()) { try { SERVER_SOCKET = new ServerSocket(Options.getPort(), 1, InetAddress.getLocalHost()); } catch (UnknownHostException e) { // shouldn't happen } catch (IOException e) { errorAndExit( null, String.format( <<<<<<< "- An instance of opsu! is already running.\n" + "- Another program is bound to port %d. " + "You can change the port opsu! uses by editing the \"Port\" field in the configuration file.", Options.getPort()), null, false); System.exit(1); } ======= "- An instance of opsu! is already running.\n" + "- Another program is bound to port %d. " + "You can change the port opsu! uses by editing the \"Port\" field in the configuration file.", Options.getPort() ), false ); >>>>>>> "- An instance of opsu! is already running.\n" + "- Another program is bound to port %d. " + "You can change the port opsu! uses by editing the \"Port\" field in the configuration file.", Options.getPort() ), false ); }
<<<<<<< float curveAlpha = 1f; if (GameMod.HIDDEN.isActive() && trackPosition > getTime()) { curveAlpha = Math.max(0f, 1f - ((float) (trackPosition - getTime()) / (getEndTime() - getTime())) * 1.05f); ======= float oldWhiteFadeAlpha = Colors.WHITE_FADE.a; float sliderAlpha = 1f; if (GameMod.HIDDEN.isActive() && trackPosition > hitObject.getTime()) { // "Hidden" mod: fade out sliders Colors.WHITE_FADE.a = color.a = sliderAlpha = Math.max(0f, 1f - ((float) (trackPosition - hitObject.getTime()) / (getEndTime() - hitObject.getTime())) * 1.05f); >>>>>>> float oldWhiteFadeAlpha = Colors.WHITE_FADE.a; float sliderAlpha = 1f; if (GameMod.HIDDEN.isActive() && trackPosition > hitObject.getTime()) { // "Hidden" mod: fade out sliders Colors.WHITE_FADE.a = color.a = sliderAlpha = Math.max(0f, 1f - ((float) (trackPosition - hitObject.getTime()) / (getEndTime() - hitObject.getTime())) * 1.05f); <<<<<<< if (isCurveCompletelyDrawn) { for (int tcurRepeat = currentRepeats; tcurRepeat <= currentRepeats + 1; tcurRepeat++) { if (hitObject.getRepeatCount() - 1 > tcurRepeat) { Image arrow = GameImage.REVERSEARROW.getImage(); arrow = arrow.getScaledCopy((float) (1 + 0.2d * ((trackPosition + sliderTime * tcurRepeat) % 292) / 292)); Color arrowColor = Color.white; if (tcurRepeat != currentRepeats) { if (sliderTime == 0) continue; float t = Math.max(getT(trackPosition, true), 0); arrow.setAlpha((float) (t - Math.floor(t))); } else arrow.setAlpha(Options.isSliderSnaking() ? decorationsAlpha : 1f); if (tcurRepeat % 2 == 0) { // last circle arrow.setRotation(curve.getEndAngle()); arrow.drawCentered(endPos.x, endPos.y, arrowColor); } else { // first circle arrow.setRotation(curve.getStartAngle()); arrow.drawCentered(x, y, arrowColor); ======= if (curveInterval == 1.0f) { for (int tcurRepeat = currentRepeats; tcurRepeat <= currentRepeats + 1 && tcurRepeat < repeatCount - 1; tcurRepeat++) { Image arrow = GameImage.REVERSEARROW.getImage(); // bouncing animation //arrow = arrow.getScaledCopy((float) (1 + 0.2d * ((trackPosition + sliderTime * tcurRepeat) % 292) / 292)); float colorLuminance = Utils.getLuminance(color); Color arrowColor = colorLuminance < 0.8f ? Color.white : Color.black; if (tcurRepeat == 0) { arrow.setAlpha(Options.isSliderSnaking() ? decorationsAlpha : 1f); } else { if (!sliderClickedInitial) { continue; >>>>>>> if (isCurveCompletelyDrawn) { for (int tcurRepeat = currentRepeats; tcurRepeat <= currentRepeats + 1 && tcurRepeat < repeatCount - 1; tcurRepeat++) { Image arrow = GameImage.REVERSEARROW.getImage(); arrow = arrow.getScaledCopy((float) (1 + 0.2d * ((trackPosition + sliderTime * tcurRepeat) % 292) / 292)); if (tcurRepeat == 0) { arrow.setAlpha(Options.isSliderSnaking() ? decorationsAlpha : 1f); } else { if (!sliderClickedInitial) { continue; <<<<<<< data.sliderTickResult(time, GameData.HIT_SLIDER30, x, y, hitObject, currentRepeats); data.sendInitialSliderResult(time, x, y, color, mirrorColor); ======= data.sendSliderTickResult(time, GameData.HIT_SLIDER30, x, y, hitObject, currentRepeats); data.sendSliderStartResult(time, x, y, color, true); >>>>>>> data.sendSliderTickResult(time, GameData.HIT_SLIDER30, x, y, hitObject, currentRepeats); data.sendSliderStartResult(time, x, y, color, true); <<<<<<< if (Options.isMergingSliders()) { game.setSlidercurveFrom(baseSliderFrom + curve.getCurvePoints().length + 1); } ======= >>>>>>> if (Options.isMergingSliders()) { game.setSlidercurveFrom(baseSliderFrom + curve.getCurvePoints().length + 1); } <<<<<<< if (Options.isReverseArrowAnimationEnabled()) { // send hit result, to fade out reversearrow HitObjectType type; float posX, posY; if (currentRepeats % 2 == 1) { type = HitObjectType.SLIDER_LAST; Vec2f endPos = curve.pointAt(1); posX = endPos.x; posY = endPos.y; } else { type = HitObjectType.SLIDER_FIRST; posX = this.x; posY = this.y; } data.sendRepeatSliderResult(trackPosition, posX, posY, Color.white, curve, type); } ======= >>>>>>>
<<<<<<< public static int getQuadrant(double x, double y) { if (x < Options.width / 2d) { return y < Options.height / 2d ? 2 : 3; } return y < Options.height / 2d ? 1 : 4; } /* public static Color shiftHue(Color color, double H) { double U = Math.cos(H * Math.PI / 180d); double W = Math.sin(H * Math.PI / 180d); Color n = new Color(0, 0, 0); n.r = (float) ((0.299d + 0.701d * U + 0.168d * W) * color.r + (0.587d - 0.587d * U + 0.330d * W) * color.g + (0.114d - 0.114d * U - 0.497 * W) * color.b); n.g = (float) ((0.299 + 0.299 * U - 0.328 * W) * color.r + (0.587d - 0.413 * U + 0.035 * W) * color.g + (0.114d - 0.114d * U - 0.292 * W) * color.b); n.b = (float) ((0.299d + 0.300d * U + 1.250d * W) * color.r + (0.587d - 0.585d * U + 1.050d * W) * color.g + (0.114 - 0.886 * U - 0.203 * W) * color.b); return n; } */ public static float[] mirrorPoint(float x, float y) { double dx = x - Options.width / 2d; double dy = y - Options.height / 2d; double ang = Math.atan2(dy, dx); double d = -Math.sqrt(dx * dx + dy * dy); return new float[]{ (float) (Options.width / 2d + Math.cos(ang) * d), (float) (Options.height / 2d + Math.sin(ang) * d) }; } ======= /** * Switches validation of SSL certificates on or off by installing a default * all-trusting {@link TrustManager}. * @param enabled whether to validate SSL certificates * @author neu242 (http://stackoverflow.com/a/876785) */ public static void setSSLCertValidation(boolean enabled) { // create a trust manager that does not validate certificate chains TrustManager[] trustAllCerts = new TrustManager[]{ new X509TrustManager() { @Override public X509Certificate[] getAcceptedIssuers() { return new X509Certificate[0]; } @Override public void checkClientTrusted(X509Certificate[] certs, String authType) {} @Override public void checkServerTrusted(X509Certificate[] certs, String authType) {} } }; // install the all-trusting trust manager try { SSLContext sc = SSLContext.getInstance("SSL"); sc.init(null, enabled ? null : trustAllCerts, null); HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); } catch (Exception e) {} } >>>>>>> /** * Switches validation of SSL certificates on or off by installing a default * all-trusting {@link TrustManager}. * @param enabled whether to validate SSL certificates * @author neu242 (http://stackoverflow.com/a/876785) */ public static void setSSLCertValidation(boolean enabled) { // create a trust manager that does not validate certificate chains TrustManager[] trustAllCerts = new TrustManager[]{ new X509TrustManager() { @Override public X509Certificate[] getAcceptedIssuers() { return new X509Certificate[0]; } @Override public void checkClientTrusted(X509Certificate[] certs, String authType) {} @Override public void checkServerTrusted(X509Certificate[] certs, String authType) {} } }; // install the all-trusting trust manager try { SSLContext sc = SSLContext.getInstance("SSL"); sc.init(null, enabled ? null : trustAllCerts, null); HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory()); } catch (Exception e) {} } public static int getQuadrant(double x, double y) { if (x < Options.width / 2d) { return y < Options.height / 2d ? 2 : 3; } return y < Options.height / 2d ? 1 : 4; } /* public static Color shiftHue(Color color, double H) { double U = Math.cos(H * Math.PI / 180d); double W = Math.sin(H * Math.PI / 180d); Color n = new Color(0, 0, 0); n.r = (float) ((0.299d + 0.701d * U + 0.168d * W) * color.r + (0.587d - 0.587d * U + 0.330d * W) * color.g + (0.114d - 0.114d * U - 0.497 * W) * color.b); n.g = (float) ((0.299 + 0.299 * U - 0.328 * W) * color.r + (0.587d - 0.413 * U + 0.035 * W) * color.g + (0.114d - 0.114d * U - 0.292 * W) * color.b); n.b = (float) ((0.299d + 0.300d * U + 1.250d * W) * color.r + (0.587d - 0.585d * U + 1.050d * W) * color.g + (0.114 - 0.886 * U - 0.203 * W) * color.b); return n; } */ public static float[] mirrorPoint(float x, float y) { double dx = x - Options.width / 2d; double dy = y - Options.height / 2d; double ang = Math.atan2(dy, dx); double d = -Math.sqrt(dx * dx + dy * dy); return new float[]{ (float) (Options.width / 2d + Math.cos(ang) * d), (float) (Options.height / 2d + Math.sin(ang) * d) }; }
<<<<<<< if (isAutoMod) {// "auto" mod: catch any missed notes due to lag data.hitResult(time, GameData.HIT_300, x, y, color, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false); if (Options.isMirror() && GameMod.AUTO.isActive()) { float[] m = Utils.mirrorPoint(x, y); data.hitResult(time, GameData.HIT_300, m[0], m[1], mirrorColor, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false, false); } } ======= if (isAutoMod) // "auto" mod: catch any missed notes due to lag data.sendHitResult(time, GameData.HIT_300, x, y, color, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false); >>>>>>> if (isAutoMod) {// "auto" mod: catch any missed notes due to lag data.sendHitResult(time, GameData.HIT_300, x, y, color, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false); if (Options.isMirror() && GameMod.AUTO.isActive()) { float[] m = Utils.mirrorPoint(x, y); data.sendHitResult(time, GameData.HIT_300, m[0], m[1], mirrorColor, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false, false); } } <<<<<<< data.hitResult(time, GameData.HIT_300, x, y, color, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false); if (Options.isMirror() && GameMod.AUTO.isActive()) { float[] m = Utils.mirrorPoint(x, y); data.hitResult(time, GameData.HIT_300, m[0], m[1], mirrorColor, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false, false); } ======= data.sendHitResult(time, GameData.HIT_300, x, y, color, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false); >>>>>>> data.sendHitResult(time, GameData.HIT_300, x, y, color, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false); if (Options.isMirror() && GameMod.AUTO.isActive()) { float[] m = Utils.mirrorPoint(x, y); data.sendHitResult(time, GameData.HIT_300, m[0], m[1], mirrorColor, comboEnd, hitObject, HitObjectType.CIRCLE, true, 0, null, false, false); }
<<<<<<< HIT_MISS = 0, HIT_50 = 1, HIT_100 = 2, HIT_300 = 3, HIT_100K = 4, // 100-Katu HIT_300K = 5, // 300-Katu HIT_300G = 6, // Geki HIT_SLIDER10 = 7, HIT_SLIDER30 = 8, HIT_MAX = 9, // not a hit result HIT_SLIDER_INITIAL = 10; ======= HIT_MISS = 0, HIT_50 = 1, HIT_100 = 2, HIT_300 = 3, HIT_100K = 4, // 100-Katu HIT_300K = 5, // 300-Katu HIT_300G = 6, // Geki HIT_SLIDER10 = 7, HIT_SLIDER30 = 8, HIT_MAX = 9, // not a hit result HIT_SLIDER_REPEAT = 10; // not a hit result >>>>>>> HIT_MISS = 0, HIT_50 = 1, HIT_100 = 2, HIT_300 = 3, HIT_100K = 4, // 100-Katu HIT_300K = 5, // 300-Katu HIT_300G = 6, // Geki HIT_SLIDER10 = 7, HIT_SLIDER30 = 8, HIT_MAX = 9, // not a hit result HIT_SLIDER_INITIAL = 10, // not a hit result HIT_SLIDER_REPEAT = 11; // not a hit result <<<<<<< public void sendInitialSliderResult(int time, float x, float y, Color color, Color mirrorcolor) { hitResultList.add(new HitObjectResult(time, HIT_SLIDER_INITIAL, x, y, color, null, null, true, false)); if (!Options.isMirror() || !GameMod.AUTO.isActive()) { return; } float[] m = Utils.mirrorPoint(x, y); hitResultList.add(new HitObjectResult(time, HIT_SLIDER_INITIAL, m[0], m[1], mirrorcolor, null, null, true, false)); } ======= public void sendRepeatSliderResult(int time, float x, float y, Color color, Curve curve, HitObjectType type) { hitResultList.add(new HitObjectResult(time, HIT_SLIDER_REPEAT, x, y, color, type, curve, true, true)); } >>>>>>> public void sendInitialSliderResult(int time, float x, float y, Color color, Color mirrorcolor) { hitResultList.add(new HitObjectResult(time, HIT_SLIDER_INITIAL, x, y, color, null, null, true, false)); if (!Options.isMirror() || !GameMod.AUTO.isActive()) { return; } float[] m = Utils.mirrorPoint(x, y); hitResultList.add(new HitObjectResult(time, HIT_SLIDER_INITIAL, m[0], m[1], mirrorcolor, null, null, true, false)); } public void sendRepeatSliderResult(int time, float x, float y, Color color, Curve curve, HitObjectType type) { hitResultList.add(new HitObjectResult(time, HIT_SLIDER_REPEAT, x, y, color, type, curve, true, true)); }
<<<<<<< import itdelatrisu.opsu.downloads.servers.OsuMirrorServer; import itdelatrisu.opsu.ui.KinecticScrolling; ======= import itdelatrisu.opsu.downloads.servers.MengSkyServer; import itdelatrisu.opsu.downloads.servers.MnetworkServer; import itdelatrisu.opsu.downloads.servers.YaSOnlineServer; import itdelatrisu.opsu.ui.Colors; import itdelatrisu.opsu.ui.DropdownMenu; import itdelatrisu.opsu.ui.Fonts; >>>>>>> import itdelatrisu.opsu.downloads.servers.MengSkyServer; import itdelatrisu.opsu.downloads.servers.MnetworkServer; import itdelatrisu.opsu.downloads.servers.YaSOnlineServer; import itdelatrisu.opsu.ui.Colors; import itdelatrisu.opsu.ui.DropdownMenu; import itdelatrisu.opsu.ui.Fonts; import itdelatrisu.opsu.ui.KinecticScrolling; <<<<<<< nodes[index].drawResult(g, offset + i * DownloadNode.getButtonOffset(), DownloadNode.resultContains(mouseX, mouseY - offset, i), ======= nodes[index].drawResult(g, i, DownloadNode.resultContains(mouseX, mouseY, i) && !inDropdownMenu, >>>>>>> nodes[index].drawResult(g, offset + i * DownloadNode.getButtonOffset(), DownloadNode.resultContains(mouseX, mouseY - offset, i) && !inDropdownMenu, <<<<<<< queryThread = new Thread() { @Override public void run() { activeRequests++; // check page direction Page lastPageDir = pageDir; pageDir = Page.RESET; int lastPageSize = (resultList != null) ? resultList.length : 0; int newPage = page; if (lastPageDir == Page.RESET) newPage = 1; else if (lastPageDir == Page.NEXT) newPage++; else if (lastPageDir == Page.PREVIOUS) newPage--; try { DownloadNode[] nodes = server.resultList(query, newPage, rankedOnly); if (activeRequests - 1 == 0) { // update page total page = newPage; if (nodes != null) { if (lastPageDir == Page.NEXT) pageResultTotal += nodes.length; else if (lastPageDir == Page.PREVIOUS) pageResultTotal -= lastPageSize; else if (lastPageDir == Page.RESET) pageResultTotal = nodes.length; } else pageResultTotal = 0; resultList = nodes; totalResults = server.totalResults(); focusResult = -1; startResultPos.setPosition(0); if (nodes == null) searchResultString = "An error has occurred."; else { if (query.isEmpty()) searchResultString = "Type to search!"; else if (totalResults == 0 || resultList.length == 0) searchResultString = "No results found."; else searchResultString = String.format("%d result%s found!", totalResults, (totalResults == 1) ? "" : "s"); } } } catch (IOException e) { searchResultString = "Could not establish connection to server."; } finally { activeRequests--; queryThread = null; } } }; ======= searchQuery = new SearchQuery(query, server); queryThread = new Thread(searchQuery); >>>>>>> searchQuery = new SearchQuery(query, server); queryThread = new Thread(searchQuery); <<<<<<< resetSearchTimer(); return; } if (serverButton.contains(x, y)) { SoundController.playSound(SoundEffect.MENUCLICK); resultList = null; startResultPos.setPosition(0); focusResult = -1; totalResults = 0; page = 0; pageResultTotal = 1; pageDir = Page.RESET; searchResultString = "Loading data from server..."; serverIndex = (serverIndex + 1) % SERVERS.length; lastQuery = null; pageDir = Page.RESET; ======= if (searchQuery != null) searchQuery.interrupt(); >>>>>>> if (searchQuery != null) searchQuery.interrupt();
<<<<<<< ======= import com.altamiracorp.lumify.core.model.ontology.PropertyName; import com.altamiracorp.lumify.core.security.VisibilityTranslator; >>>>>>> import com.altamiracorp.lumify.core.security.VisibilityTranslator; <<<<<<< import com.altamiracorp.securegraph.ElementMutation; import com.altamiracorp.securegraph.Graph; import com.altamiracorp.securegraph.Property; import com.altamiracorp.securegraph.Vertex; import com.altamiracorp.securegraph.Visibility; ======= import com.altamiracorp.securegraph.ElementMutation; import com.altamiracorp.securegraph.Graph; import com.altamiracorp.securegraph.Property; import com.altamiracorp.securegraph.Vertex; >>>>>>> import com.altamiracorp.securegraph.ElementMutation; import com.altamiracorp.securegraph.Graph; import com.altamiracorp.securegraph.Property; import com.altamiracorp.securegraph.Vertex; <<<<<<< ElementMutation<Vertex> graphVertexMutation = graphVertex.prepareMutation(); Visibility visibility = new Visibility(""); // TODO set visibility graphVertexMutation.setProperty(propertyName, value, visibility); // TODO should we wrap with Text if (GEO_LOCATION.getKey().equals(propertyName)) { String[] latlong = valueStr.substring(valueStr.indexOf('(') + 1, valueStr.indexOf(')')).split(","); GeoPoint geoPoint = new GeoPoint(Double.parseDouble(latlong[0]), Double.parseDouble(latlong[1])); GEO_LOCATION.setProperty(graphVertexMutation, geoPoint, visibility); GEO_LOCATION_DESCRIPTION.setProperty(graphVertexMutation, "", visibility); } else if (SOURCE.getKey().equals(propertyName)) { SOURCE.setProperty(graphVertexMutation, value.toString(), visibility); } ======= ElementMutation<Vertex> graphVertexMutation = GraphUtil.setProperty(graphVertex, propertyName, value, visibilitySource, this.visibilityTranslator); >>>>>>> ElementMutation<Vertex> graphVertexMutation = GraphUtil.setProperty(graphVertex, propertyName, value, visibilitySource, this.visibilityTranslator);
<<<<<<< import itdelatrisu.opsu.ui.KinecticScrolling; ======= import itdelatrisu.opsu.ui.Colors; import itdelatrisu.opsu.ui.Fonts; >>>>>>> import itdelatrisu.opsu.ui.KinecticScrolling; import itdelatrisu.opsu.ui.Colors; import itdelatrisu.opsu.ui.Fonts; <<<<<<< float offset = (node == hoverIndex) ? hoverOffset : 0f; float ypos = buttonY + (i*buttonOffset) ; float mid = height/2 - ypos - buttonOffset/2; final float circleRadi = 1000 * GameImage.getUIscale(); //finds points along a very large circle // x^2 = h^2 - y^2 float t = circleRadi*circleRadi - (mid*mid); float xpos = (float)(t>0?Math.sqrt(t):0) - circleRadi + 50 * GameImage.getUIscale(); ======= float offset = (i == hoverIndex) ? hoverOffset.getValue() : 0f; >>>>>>> float offset = (node == hoverIndex) ? hoverOffset.getValue() : 0f; float ypos = buttonY + (i*buttonOffset) ; float mid = height/2 - ypos - buttonOffset/2; final float circleRadi = 700 * GameImage.getUIscale(); //finds points along a very large circle (x^2 = h^2 - y^2) float t = circleRadi * circleRadi - (mid * mid); float xpos = (float)(t>0?Math.sqrt(t):0) - circleRadi + 50 * GameImage.getUIscale(); <<<<<<< ======= // score buttons if (focusScores != null) { int scoreButtons = Math.min(focusScores.length - startScore, MAX_SCORE_BUTTONS); float timerScale = 1f - (1 / 3f) * ((MAX_SCORE_BUTTONS - scoreButtons) / (float) (MAX_SCORE_BUTTONS - 1)); int duration = (int) (songChangeTimer.getDuration() * timerScale); int segmentDuration = (int) ((2 / 3f) * songChangeTimer.getDuration()); int time = songChangeTimer.getTime(); for (int i = 0, rank = startScore; i < scoreButtons; i++, rank++) { long prevScore = (rank + 1 < focusScores.length) ? focusScores[rank + 1].score : -1; float t = Utils.clamp((time - (i * (duration - segmentDuration) / scoreButtons)) / (float) segmentDuration, 0f, 1f); boolean focus = (t >= 0.9999f && ScoreData.buttonContains(mouseX, mouseY, i)); focusScores[rank].draw(g, i, rank, prevScore, focus, t); } // scroll bar if (focusScores.length > MAX_SCORE_BUTTONS && ScoreData.areaContains(mouseX, mouseY)) ScoreData.drawScrollbar(g, startScore, focusScores.length); } >>>>>>> <<<<<<< ======= // scroll bar if (focusNode != null) { int focusNodes = focusNode.getBeatmapSet().size(); int totalNodes = BeatmapSetList.get().size() + focusNodes - 1; if (totalNodes > MAX_SONG_BUTTONS) { int startIndex = startNode.index; if (startNode.index > focusNode.index) startIndex += focusNodes; else if (startNode.index == focusNode.index) startIndex += startNode.beatmapIndex; UI.drawScrollbar(g, startIndex, totalNodes, MAX_SONG_BUTTONS, width, headerY + DIVIDER_LINE_WIDTH / 2, 0, buttonOffset - DIVIDER_LINE_WIDTH * 1.5f, buttonOffset, Colors.BLACK_ALPHA, Color.white, true); } } >>>>>>> <<<<<<< if (node == hoverIndex) { if (hoverOffset < MAX_HOVER_OFFSET) { hoverOffset += delta / 3f; if (hoverOffset > MAX_HOVER_OFFSET) hoverOffset = MAX_HOVER_OFFSET; } } else { hoverIndex = node ; hoverOffset = 0f; ======= if (i == hoverIndex) hoverOffset.update(delta); else { hoverIndex = i; hoverOffset.setTime(0); >>>>>>> if (node == hoverIndex) { hoverOffset.update(delta); } else { hoverIndex = node ; hoverOffset.setTime(0); <<<<<<< hoverOffset = 0f; hoverIndex = null; ======= hoverOffset.setTime(0); hoverIndex = -1; >>>>>>> hoverOffset.setTime(0); hoverIndex = null; <<<<<<< if (focusScores != null) { int startScore = (int) (startScorePos.getPosition() / ScoreData.getButtonOffset()); int offset = (int) (-startScorePos.getPosition() + startScore * ScoreData.getButtonOffset()); for (int i = 0; i < MAX_SCORE_BUTTONS; i++) { int rank = startScore + i; if (rank < 0) continue; if (rank >= focusScores.length) break; if (ScoreData.buttonContains(mouseX, mouseY - offset, i)) { ======= if (focusScores != null && ScoreData.areaContains(mouseX, mouseY)) { int scoreButtons = Math.min(focusScores.length - startScore, MAX_SCORE_BUTTONS); for (int i = 0, rank = startScore; i < scoreButtons; i++, rank++) { if (ScoreData.buttonContains(mouseX, mouseY, i)) { >>>>>>> if (focusScores != null && ScoreData.areaContains(mouseX, mouseY)) { int startScore = (int) (startScorePos.getPosition() / ScoreData.getButtonOffset()); int offset = (int) (-startScorePos.getPosition() + startScore * ScoreData.getButtonOffset()); int scoreButtons = Math.min(focusScores.length - startScore, MAX_SCORE_BUTTONS); for (int i = 0, rank = startScore; i < scoreButtons; i++, rank++) { if (rank < 0) continue; if (ScoreData.buttonContains(mouseX, mouseY - offset, i)) { <<<<<<< float oldHoverOffset = hoverOffset; BeatmapSetNode oldHoverIndex = hoverIndex; ======= int oldHoverOffsetTime = hoverOffset.getTime(); int oldHoverIndex = hoverIndex; >>>>>>> int oldHoverOffsetTime = hoverOffset.getTime(); BeatmapSetNode oldHoverIndex = hoverIndex; <<<<<<< for (int i = 0; i < MAX_SCORE_BUTTONS + 1; i++) { int startScore = (int) (startScorePos.getPosition() / ScoreData.getButtonOffset()); int offset = (int) (-startScorePos.getPosition() + startScore * ScoreData.getButtonOffset()); int rank = startScore + i; if (rank >= focusScores.length) break; if (ScoreData.buttonContains(x, y - offset, i)) { ======= int scoreButtons = Math.min(focusScores.length - startScore, MAX_SCORE_BUTTONS); for (int i = 0, rank = startScore; i < scoreButtons; i++, rank++) { if (ScoreData.buttonContains(x, y, i)) { >>>>>>> int startScore = (int) (startScorePos.getPosition() / ScoreData.getButtonOffset()); int offset = (int) (-startScorePos.getPosition() + startScore * ScoreData.getButtonOffset()); int scoreButtons = Math.min(focusScores.length - startScore, MAX_SCORE_BUTTONS); for (int i = 0, rank = startScore; i < scoreButtons; i++, rank++) { if (ScoreData.buttonContains(x, y - offset, i)) { <<<<<<< float oldHoverOffset = hoverOffset; BeatmapSetNode oldHoverIndex = hoverIndex; ======= int oldHoverOffsetTime = hoverOffset.getTime(); int oldHoverIndex = hoverIndex; >>>>>>> int oldHoverOffsetTime = hoverOffset.getTime(); BeatmapSetNode oldHoverIndex = hoverIndex; <<<<<<< float oldHoverOffset = hoverOffset; BeatmapSetNode oldHoverIndex = hoverIndex; ======= int oldHoverOffsetTime = hoverOffset.getTime(); int oldHoverIndex = hoverIndex; >>>>>>> int oldHoverOffsetTime = hoverOffset.getTime(); BeatmapSetNode oldHoverIndex = hoverIndex; <<<<<<< hoverOffset = 0f; hoverIndex = null; startScorePos.setPosition(0); ======= hoverOffset.setTime(0); hoverIndex = -1; startScore = 0; >>>>>>> hoverOffset.setTime(0); hoverIndex = null; startScorePos.setPosition(0); <<<<<<< // reset state and node references MusicController.reset(); startNode = focusNode = null; scoreMap = null; focusScores = null; oldFocusNode = null; randomStack = new Stack<SongNode>(); songInfo = null; hoverOffset = 0f; hoverIndex = null; search.setText(""); searchTimer = SEARCH_DELAY; searchTransitionTimer = SEARCH_TRANSITION_TIME; searchResultString = null; // reload songs in new thread reloadThread = new Thread() { @Override public void run() { // clear the beatmap cache BeatmapDB.clearDatabase(); // invoke unpacker and parser File beatmapDir = Options.getBeatmapDir(); OszUnpacker.unpackAllFiles(Options.getOSZDir(), beatmapDir); BeatmapParser.parseAllFiles(beatmapDir); // initialize song list if (BeatmapSetList.get().size() > 0) { BeatmapSetList.get().init(); setFocus(BeatmapSetList.get().getRandomNode(), -1, true, true); } else MusicController.playThemeSong(); reloadThread = null; } }; reloadThread.start(); ======= reloadBeatmaps(true); >>>>>>> reloadBeatmaps(true); <<<<<<< /** * Updates the song list data required for drawing. */ private void updateDrawnSongPos() { float songNodePosDrawn = songScrolling.getPosition(); int startNodeIndex = (int) (songNodePosDrawn / buttonOffset); buttonY = -songNodePosDrawn + buttonOffset * startNodeIndex + headerY - DIVIDER_LINE_WIDTH; float max = (BeatmapSetList.get().size() + (focusNode != null ? focusNode.getBeatmapSet().size() : 0)); songScrolling.setMinMax(0 - buttonOffset * 3, (max - MAX_SONG_BUTTONS- 1 + 3) * buttonOffset); //negative startNodeIndex means the first Node is below the header so offset it. if (startNodeIndex <= 0) { startNodeOffset = -startNodeIndex; startNodeIndex = 0; } else { startNodeOffset = 0; ======= int height = container.getHeight(); if (n < 0 && startNode.prev != null) { startNode = startNode.prev; buttonY += buttonOffset / 4; if (buttonY > headerY + height * 0.02f) buttonY = headerY + height * 0.02f; n++; shifted = true; } else if (n > 0 && startNode.next != null && BeatmapSetList.get().getNode(startNode, MAX_SONG_BUTTONS) != null) { startNode = startNode.next; buttonY -= buttonOffset / 4; if (buttonY < headerY - height * 0.02f) buttonY = headerY - height * 0.02f; n--; shifted = true; } else break; } if (shifted) { hoverOffset.setTime(0); hoverIndex = -1; >>>>>>> /** * Updates the song list data required for drawing. */ private void updateDrawnSongPos() { float songNodePosDrawn = songScrolling.getPosition(); int startNodeIndex = (int) (songNodePosDrawn / buttonOffset); buttonY = -songNodePosDrawn + buttonOffset * startNodeIndex + headerY - DIVIDER_LINE_WIDTH; float max = (BeatmapSetList.get().size() + (focusNode != null ? focusNode.getBeatmapSet().size() : 0)); songScrolling.setMinMax(0 - buttonOffset * 3, (max - MAX_SONG_BUTTONS- 1 + 3) * buttonOffset); //negative startNodeIndex means the first Node is below the header so offset it. if (startNodeIndex <= 0) { startNodeOffset = -startNodeIndex; startNodeIndex = 0; } else { startNodeOffset = 0; <<<<<<< hoverOffset = 0f; hoverIndex = null; ======= hoverOffset.setTime(0); hoverIndex = -1; >>>>>>> hoverOffset.setTime(0); hoverIndex = null; <<<<<<< ======= // calculate difficulties calculateStarRatings(node.getBeatmapSet()); // if start node was previously expanded, move it if (startNode != null && startNode.index == expandedIndex) startNode = BeatmapSetList.get().getBaseNode(startNode.index); >>>>>>> // calculate difficulties calculateStarRatings(node.getBeatmapSet()); // if start node was previously expanded, move it if (startNode != null && startNode.index == expandedIndex) startNode = BeatmapSetList.get().getBaseNode(startNode.index); <<<<<<< updateDrawnSongPos(); // make sure focusNode is on the screen int val = focusNode.index + focusNode.beatmapIndex; if (val <= startNode.index) songScrolling.scrollToPosition(val * buttonOffset); else if (val > startNode.index + MAX_SONG_BUTTONS - 1) songScrolling.scrollToPosition((val - MAX_SONG_BUTTONS + 1) * buttonOffset); /* //Centers selected node int val = focusNode.index + focusNode.beatmapIndex - MAX_SONG_BUTTONS/2; songScrolling.scrollToPosition(val * buttonOffset); //*/ /* //Attempts to make all nodes in the set at least visible if( focusNode.index * buttonOffset < songScrolling.getPosition()) songScrolling.scrollToPosition(focusNode.index * buttonOffset); if ( ( focusNode.index + focusNode.getBeatmapSet().size() ) * buttonOffset > songScrolling.getPosition() + footerY - headerY) songScrolling.scrollToPosition((focusNode.index + focusNode.getBeatmapSet().size() ) * buttonOffset - (footerY - headerY)); //*/ ======= // load background image beatmap.loadBackground(); boolean isBgNull = lastBackgroundImage == null || beatmap.bg == null; if ((isBgNull && lastBackgroundImage != beatmap.bg) || (!isBgNull && !beatmap.bg.equals(lastBackgroundImage))) { bgAlpha.setTime(0); lastBackgroundImage = beatmap.bg; } >>>>>>> updateDrawnSongPos(); // make sure focusNode is on the screen int val = focusNode.index + focusNode.beatmapIndex; if (val <= startNode.index) songScrolling.scrollToPosition(val * buttonOffset); else if (val > startNode.index + MAX_SONG_BUTTONS - 1) songScrolling.scrollToPosition((val - MAX_SONG_BUTTONS + 1) * buttonOffset); /* //Centers selected node int val = focusNode.index + focusNode.beatmapIndex - MAX_SONG_BUTTONS/2; songScrolling.scrollToPosition(val * buttonOffset); //*/ /* //Attempts to make all nodes in the set at least visible if( focusNode.index * buttonOffset < songScrolling.getPosition()) songScrolling.scrollToPosition(focusNode.index * buttonOffset); if ( ( focusNode.index + focusNode.getBeatmapSet().size() ) * buttonOffset > songScrolling.getPosition() + footerY - headerY) songScrolling.scrollToPosition((focusNode.index + focusNode.getBeatmapSet().size() ) * buttonOffset - (footerY - headerY)); //*/ // load background image beatmap.loadBackground(); boolean isBgNull = lastBackgroundImage == null || beatmap.bg == null; if ((isBgNull && lastBackgroundImage != beatmap.bg) || (!isBgNull && !beatmap.bg.equals(lastBackgroundImage))) { bgAlpha.setTime(0); lastBackgroundImage = beatmap.bg; }
<<<<<<< import static com.dubreuia.model.Action.accessCanBeTightened; ======= import static com.dubreuia.model.Action.customUnqualifiedStaticMemberAccess; >>>>>>> import static com.dubreuia.model.Action.accessCanBeTightened; import static com.dubreuia.model.Action.customUnqualifiedStaticMemberAccess; <<<<<<< panel.add(checkboxes.get(accessCanBeTightened)); ======= panel.add(checkboxes.get(methodMayBeStatic)); >>>>>>> panel.add(checkboxes.get(accessCanBeTightened)); panel.add(checkboxes.get(methodMayBeStatic));
<<<<<<< } /** * Classes that extends WebCrawler should overwrite this function to tell the * crawler whether the given url should be crawled or not. The following * default implementation indicates that all urls should be included in the crawl. * * @param url * the url which we are interested to know whether it should be * included in the crawl or not. * @param referringPage * The Page in which this url was found. * @return if the url should be included in the crawl it returns true, * otherwise false is returned. */ public boolean shouldVisit(Page referringPage, WebURL url) { // By default allow all urls to be crawled. return true; } /** * Determine whether links found at the given URL should be added to the queue for crawling. * By default this method returns true always, but classes that extend WebCrawler can * override it in order to implement particular policies about which pages should be * mined for outgoing links and which should not. * * If links from the URL are not being followed, then we are not operating as * a web crawler and need not check robots.txt before fetching the single URL. * (see definition at http://www.robotstxt.org/faq/what.html). Thus URLs that * return false from this method will not be subject to robots.txt filtering. * * @param url the URL of the page under consideration * @return true if outgoing links from this page should be added to the queue. */ protected boolean shouldFollowLinksIn(WebURL url) { return true; } /** * Classes that extends WebCrawler should overwrite this function to process * the content of the fetched and parsed page. * * @param page * the page object that is just fetched and parsed. */ public void visit(Page page) { // Do nothing by default // Sub-classed should override this to add their custom functionality } private void processPage(WebURL curURL) { PageFetchResult fetchResult = null; try { if (curURL == null) { throw new Exception("Failed processing a NULL url !?"); } fetchResult = pageFetcher.fetchPage(curURL); int statusCode = fetchResult.getStatusCode(); handlePageStatusCode(curURL, statusCode, EnglishReasonPhraseCatalog.INSTANCE .getReason(statusCode, Locale.ENGLISH)); // Finds the status reason for all known statuses Page page = new Page(curURL); page.setFetchResponseHeaders(fetchResult.getResponseHeaders()); page.setStatusCode(statusCode); if (statusCode < 200 || statusCode > 299) { // Not 2XX: 2XX status codes indicate success if (statusCode == HttpStatus.SC_MOVED_PERMANENTLY || statusCode == HttpStatus.SC_MOVED_TEMPORARILY || statusCode == HttpStatus.SC_MULTIPLE_CHOICES || statusCode == HttpStatus.SC_SEE_OTHER || statusCode == HttpStatus.SC_TEMPORARY_REDIRECT || statusCode == 308) { // is 3xx todo follow https://issues.apache.org/jira/browse/HTTPCORE-389 page.setRedirect(true); if (myController.getConfig().isFollowRedirects()) { String movedToUrl = fetchResult.getMovedToUrl(); if (movedToUrl == null) { throw new RedirectException(Level.WARN, "Unexpected error, URL: " + curURL + " is redirected to NOTHING"); } page.setRedirectedToUrl(movedToUrl); ======= >>>>>>> <<<<<<< WebURL webURL = new WebURL(); webURL.setURL(movedToUrl); webURL.setParentDocid(curURL.getParentDocid()); webURL.setParentUrl(curURL.getParentUrl()); webURL.setDepth(curURL.getDepth()); webURL.setDocid(-1); webURL.setAnchor(curURL.getAnchor()); if (shouldVisit(page, webURL)) { if (!shouldFollowLinksIn(webURL) || robotstxtServer.allows(webURL)) { webURL.setDocid(docIdServer.getNewDocID(movedToUrl)); frontier.schedule(webURL); } else { logger.debug("Not visiting: {} as per the server's \"robots.txt\" policy", webURL.getURL()); } ======= /** * The CrawlController instance that has created this crawler instance will * call this function just before terminating this crawler thread. Classes * that extend WebCrawler can override this function to pass their local * data to their controller. The controller then puts these local data in a * List that can then be used for processing the local data of crawlers (if needed). * * @return currently NULL */ public Object getMyLocalData() { return null; } @Override public void run() { onStart(); while (true) { List<WebURL> assignedURLs = new ArrayList<>(50); isWaitingForNewURLs = true; frontier.getNextURLs(50, assignedURLs); isWaitingForNewURLs = false; if (assignedURLs.isEmpty()) { if (frontier.isFinished()) { return; } try { Thread.sleep(3000); } catch (InterruptedException e) { logger.error("Error occurred", e); } >>>>>>> /** * The CrawlController instance that has created this crawler instance will * call this function just before terminating this crawler thread. Classes * that extend WebCrawler can override this function to pass their local * data to their controller. The controller then puts these local data in a * List that can then be used for processing the local data of crawlers (if needed). * * @return currently NULL */ public Object getMyLocalData() { return null; } @Override public void run() { onStart(); while (true) { List<WebURL> assignedURLs = new ArrayList<>(50); isWaitingForNewURLs = true; frontier.getNextURLs(50, assignedURLs); isWaitingForNewURLs = false; if (assignedURLs.isEmpty()) { if (frontier.isFinished()) { return; } try { Thread.sleep(3000); } catch (InterruptedException e) { logger.error("Error occurred", e); }
<<<<<<< import com.altamiracorp.lumify.core.model.termMention.TermMention; import com.altamiracorp.securegraph.Vertex; ======= import com.altamiracorp.lumify.core.model.termMention.TermMentionModel; >>>>>>> import com.altamiracorp.lumify.core.model.termMention.TermMentionModel; import com.altamiracorp.securegraph.Vertex;
<<<<<<< import com.linkedin.urls.Url; import com.linkedin.urls.detection.UrlDetector; import com.linkedin.urls.detection.UrlDetectorOptions; import edu.uci.ics.crawler4j.crawler.CrawlConfig; ======= import edu.uci.ics.crawler4j.url.TLDList; >>>>>>> import com.linkedin.urls.Url; import com.linkedin.urls.detection.UrlDetector; import com.linkedin.urls.detection.UrlDetectorOptions; import edu.uci.ics.crawler4j.crawler.CrawlConfig; import edu.uci.ics.crawler4j.url.TLDList;
<<<<<<< private boolean haltOnError = false; ======= /* * number of pages to fetch/process from the database in a single read */ private int batchReadSize = 50; >>>>>>> private boolean haltOnError = false; /* * number of pages to fetch/process from the database in a single read */ private int batchReadSize = 50; <<<<<<< /** * Indicates if all crawling will stop if an unexpected error occurs. */ public boolean isHaltOnError() { return haltOnError; } /** * Should all crawling stop if an unexpected error occurs? Default is * {@code false}. * * @param haltOnError * {@code true} if all crawling should be halted */ public void setHaltOnError(boolean haltOnError) { this.haltOnError = haltOnError; } ======= /** * Number of pages to fetch/process from the database in a single read transaction. * * @return the batch read size */ public int getBatchReadSize() { return batchReadSize; } public void setBatchReadSize(int batchReadSize) { this.batchReadSize = batchReadSize; } >>>>>>> /** * Indicates if all crawling will stop if an unexpected error occurs. */ public boolean isHaltOnError() { return haltOnError; } /** * Should all crawling stop if an unexpected error occurs? Default is * {@code false}. * * @param haltOnError * {@code true} if all crawling should be halted */ public void setHaltOnError(boolean haltOnError) { this.haltOnError = haltOnError; } /** * Number of pages to fetch/process from the database in a single read transaction. * * @return the batch read size */ public int getBatchReadSize() { return batchReadSize; } public void setBatchReadSize(int batchReadSize) { this.batchReadSize = batchReadSize; } <<<<<<< sb.append("Halt on error: " + isHaltOnError() + "\n"); ======= sb.append("Batch read size: " + getBatchReadSize() + "\n"); >>>>>>> sb.append("Halt on error: " + isHaltOnError() + "\n"); sb.append("Batch read size: " + getBatchReadSize() + "\n");
<<<<<<< TLDList.setUseOnline(config.isOnlineTldListUpdate()); URLCanonicalizer.setHaltOnError(config.isHaltOnError()); ======= this.tldList = tldList == null ? new TLDList(config) : tldList; >>>>>>> this.tldList = tldList == null ? new TLDList(config) : tldList; URLCanonicalizer.setHaltOnError(config.isHaltOnError()); <<<<<<< protected synchronized Throwable getError() { return error; } private synchronized void setError(Throwable e) { this.error = e; } ======= public TLDList getTldList() { return tldList; } >>>>>>> protected synchronized Throwable getError() { return error; } private synchronized void setError(Throwable e) { this.error = e; } public TLDList getTldList() { return tldList; }
<<<<<<< public final class ThanksViewModel extends ViewModel<ThanksActivity> implements ThanksViewModelOutputs, ThanksAdapter.Delegate { ======= public final class ThanksViewModel extends ViewModel<ThanksActivity> implements ThanksAdapter.Delegate { protected @Inject ApiClientType apiClient; >>>>>>> public final class ThanksViewModel extends ViewModel<ThanksActivity> implements ThanksViewModelOutputs, ThanksAdapter.Delegate { <<<<<<< protected @Inject ApiClientType apiClient; private final BehaviorSubject<Project> project = BehaviorSubject.create(); @Override public Observable<Project> project() { return project; } public final ThanksViewModelOutputs outputs = this; ======= >>>>>>> protected @Inject ApiClientType apiClient; private final BehaviorSubject<Project> project = BehaviorSubject.create(); @Override public Observable<Project> project() { return project; } public final ThanksViewModelOutputs outputs = this; <<<<<<< ======= addSubscription(projectCardMiniClick.subscribe(__ -> koala.trackCheckoutFinishJumpToProject())); } public void takeProject(final @NonNull Project project) { >>>>>>> <<<<<<< final Observable<Category> rootCategory = project.flatMap(this::rootCategory); final Observable<Pair<List<Project>, Category>> projectsAndRootCategory = project .flatMap(this::relatedProjects) .compose(Transformers.zipPair(rootCategory)); addSubscription(view .compose(Transformers.combineLatestPair(projectsAndRootCategory)) .observeOn(AndroidSchedulers.mainThread()) .subscribe(vpc -> { final ThanksActivity view = vpc.first; final List<Project> ps = vpc.second.first; final Category category = vpc.second.second; view.showRecommended(ps, category); }) ); ======= final Category projectCategory = project.category(); if (projectCategory != null) { final Observable<Category> rootCategory = apiClient.fetchCategory(String.valueOf(projectCategory.rootId())) .compose(Transformers.neverError()); final Observable<Pair<List<Project>, Category>> projectsAndRootCategory = moreProjects(project) .compose(Transformers.zipPair(rootCategory)); addSubscription(view .compose(Transformers.combineLatestPair(projectsAndRootCategory)) .observeOn(AndroidSchedulers.mainThread()) .subscribe(vpc -> { final ThanksActivity view = vpc.first; final List<Project> ps = vpc.second.first; final Category category = vpc.second.second; view.showRecommended(ps, category); }) ); } >>>>>>> final Observable<Category> rootCategory = project.flatMap(this::rootCategory); final Observable<Pair<List<Project>, Category>> projectsAndRootCategory = project .flatMap(this::relatedProjects) .compose(Transformers.zipPair(rootCategory)); addSubscription(view .compose(Transformers.combineLatestPair(projectsAndRootCategory)) .observeOn(AndroidSchedulers.mainThread()) .subscribe(vpc -> { final ThanksActivity view = vpc.first; final List<Project> ps = vpc.second.first; final Category category = vpc.second.second; view.showRecommended(ps, category); }) );
<<<<<<< import com.kickstarter.ui.IntentKey; import com.kickstarter.ui.views.LoginPopupMenu; import com.kickstarter.viewmodels.FacebookConfirmationViewModel; ======= >>>>>>> <<<<<<< ======= import com.kickstarter.ui.views.LoginPopupMenu; import com.kickstarter.viewmodels.FacebookConfirmationViewModel; >>>>>>>
<<<<<<< termTextView.setText(context.getString(R.string.Most_Popular)); ======= if (params.sort() == DiscoveryParams.Sort.POPULAR) { termTextView.setText(context.getString(R.string.___Most_Popular)); } else { // NOTE: This path isn't currently executed, keeping it in case we modify the design to show this view // in more situations if (params.term() != null) { termTextView.setText(params.term()); } else { termTextView.setText(""); } } >>>>>>> termTextView.setText(context.getString(R.string.___Most_Popular));
<<<<<<< import com.trello.rxlifecycle.ActivityEvent; import com.trello.rxlifecycle.RxLifecycle; import com.trello.rxlifecycle.components.ActivityLifecycleProvider; ======= import com.kickstarter.ui.views.KSDialog; >>>>>>> import com.kickstarter.ui.views.KSDialog; import com.trello.rxlifecycle.ActivityEvent; import com.trello.rxlifecycle.RxLifecycle; import com.trello.rxlifecycle.components.ActivityLifecycleProvider;
<<<<<<< import android.support.annotation.NonNull; ======= import android.support.annotation.NonNull; import android.support.annotation.Nullable; >>>>>>> import android.support.annotation.NonNull; import android.support.annotation.Nullable; <<<<<<< import com.kickstarter.libs.RequiresPresenter; import com.kickstarter.libs.StatusBarUtils; ======= import com.kickstarter.libs.qualifiers.RequiresPresenter; >>>>>>> import com.kickstarter.libs.StatusBarUtils; import com.kickstarter.libs.qualifiers.RequiresPresenter;
<<<<<<< public class LoginToutPresenter extends Presenter<LoginToutActivity> { ======= public final class LoginToutPresenter extends Presenter<LoginToutActivity> { @Override protected void onCreate(@NonNull final Context context, @Nullable Bundle savedInstanceState) { super.onCreate(context, savedInstanceState); } >>>>>>> public final class LoginToutPresenter extends Presenter<LoginToutActivity> {
<<<<<<< public void projectShareClicked(@NonNull final ProjectViewHolder viewHolder) { shareClick.onNext(null); } public void projectVideoStarted(@NonNull final ProjectViewHolder viewHolder) { playVideoClick.onNext(null); } ======= >>>>>>> public void projectVideoStarted(@NonNull final ProjectViewHolder viewHolder) { playVideoClick.onNext(null); }
<<<<<<< import com.kickstarter.ui.activities.ProjectDetailActivity; import com.kickstarter.ui.view_holders.ProjectContextViewHolder; import com.kickstarter.ui.view_holders.CommentListViewHolder; ======= import com.kickstarter.ui.activities.HelpActivity; import com.kickstarter.ui.activities.ProjectActivity; >>>>>>> import com.kickstarter.ui.view_holders.ProjectContextViewHolder; import com.kickstarter.ui.view_holders.CommentListViewHolder; import com.kickstarter.ui.activities.HelpActivity; import com.kickstarter.ui.activities.ProjectActivity; <<<<<<< void inject(ProjectContextViewHolder viewHolder); void inject(ProjectDetailActivity activity); void inject(ProjectDetailPresenter presenter); ======= void inject(ProjectActivity activity); void inject(ProjectPresenter presenter); >>>>>>> void inject(ProjectContextViewHolder viewHolder); void inject(ProjectActivity activity); void inject(ProjectPresenter presenter);
<<<<<<< public final class PushNotifications { private final @ForApplication Context context; private final ApiClientType client; private final DeviceRegistrarType deviceRegistrar; ======= public class PushNotifications { protected final @ApplicationContext Context context; protected final ApiClientType client; protected final DeviceRegistrarType deviceRegistrar; >>>>>>> public final class PushNotifications { private final @ApplicationContext Context context; private final ApiClientType client; private final DeviceRegistrarType deviceRegistrar;
<<<<<<< import android.support.annotation.NonNull; import android.support.annotation.Nullable; ======= import android.support.annotation.LayoutRes; import android.support.annotation.NonNull; >>>>>>> import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.annotation.LayoutRes; <<<<<<< public CommentFeedAdapter(@NonNull final Delegate delegate) { ======= public CommentFeedAdapter(@NonNull final Project project, @NonNull final List<Pair<Project, Comment>> projectAndComments, @NonNull final Delegate delegate) { data().add(Collections.singletonList(project)); data().add(projectAndComments); >>>>>>> public CommentFeedAdapter(@NonNull final Delegate delegate) { <<<<<<< protected int layout(@NonNull final SectionRow sectionRow) { ======= protected @LayoutRes int layout(@NonNull final SectionRow sectionRow) { >>>>>>> protected @LayoutRes int layout(@NonNull final SectionRow sectionRow) { <<<<<<< protected KsrViewHolder viewHolder(final int layout, @NonNull final View view) { ======= protected KsrViewHolder viewHolder(final @LayoutRes int layout, @NonNull final View view) { >>>>>>> protected KsrViewHolder viewHolder(final @LayoutRes int layout, @NonNull final View view) {
<<<<<<< // VIDEO public void trackVideoStart() { client.track("Project Video Start"); } public void trackVideoEndedScrubbing() { client.track("Project Video End Scrubbing"); } public void trackVideoPaused() { client.track("Project Video Pause"); } public void trackVideoResume() { client.track("Project Video Resume"); } public void trackVideoStop() { client.track("Project Video Stop"); } public void trackVideoCompleted() { client.track("Project Video Complete"); } ======= // RATING public void trackAppRatingNow() { client.track("Checkout Finished Alert App Store Rating Rate Now"); } public void trackAppRatingRemindLater() { client.track("Checkout Finished Alert App Store Rating Remind Later"); } public void trackAppRatingNoThanks() { client.track("Checkout Finished Alert App Store Rating No Thanks"); } >>>>>>> // RATING public void trackAppRatingNow() { client.track("Checkout Finished Alert App Store Rating Rate Now"); } public void trackAppRatingRemindLater() { client.track("Checkout Finished Alert App Store Rating Remind Later"); } public void trackAppRatingNoThanks() { client.track("Checkout Finished Alert App Store Rating No Thanks"); } // VIDEO public void trackVideoStart() { client.track("Project Video Start"); } public void trackVideoEndedScrubbing() { client.track("Project Video End Scrubbing"); } public void trackVideoPaused() { client.track("Project Video Pause"); } public void trackVideoResume() { client.track("Project Video Resume"); } public void trackVideoStop() { client.track("Project Video Stop"); } public void trackVideoCompleted() { client.track("Project Video Complete"); }
<<<<<<< ======= import com.altamiracorp.lumify.core.model.audit.AuditAction; import com.altamiracorp.lumify.core.model.audit.AuditRepository; import com.altamiracorp.lumify.core.user.User; >>>>>>> import com.altamiracorp.lumify.core.model.audit.AuditAction; import com.altamiracorp.lumify.core.model.audit.AuditRepository; import com.altamiracorp.lumify.core.user.User;
<<<<<<< protected void onActivityResult(final int requestCode, final int resultCode, final Intent intent) { if (requestCode != ActivityRequestCodes.PROJECT_ACTIVITY_LOGIN_TOUT_ACTIVITY_USER_REQUIRED) { return; } ======= protected void onActivityResult(final int requestCode, final int resultCode, @NonNull final Intent intent) { >>>>>>> protected void onActivityResult(final int requestCode, final int resultCode, @NonNull final Intent intent) { if (requestCode != ActivityRequestCodes.PROJECT_ACTIVITY_LOGIN_TOUT_ACTIVITY_USER_REQUIRED) { return; }
<<<<<<< public static final String WEB_APP_EMBEDDED_LONG_RUNNING_PROCESS_RUNNER_ENABLED = "webAppEmbedded.longRunningProcessRunner.enabled"; public static final String WEB_APP_EMBEDDED_LONG_RUNNING_PROCESS_RUNNER_THREAD_COUNT = "webAppEmbedded.longRunningProcessRunner.threadCount"; public static final String WEB_APP_EMBEDDED_GRAPH_PROPERTY_WORKER_RUNNER_ENABLED = "webAppEmbedded.graphPropertyWorkerRunner.enabled"; public static final String WEB_APP_EMBEDDED_GRAPH_PROPERTY_WORKER_RUNNER_THREAD_COUNT = "webAppEmbedded.graphPropertyWorkerRunner.threadCount"; ======= public static final String USER_NOTIFICATION_REPOSITORY = "repository.userNotification"; public static final String LONG_RUNNING_PROCESS_RUNNER_ENABLED = "longRunningProcessRunner.enabled"; public static final String LONG_RUNNING_PROCESS_RUNNER_THREAD_COUNT = "longRunningProcessRunner.threadCount"; >>>>>>> public static final String WEB_APP_EMBEDDED_LONG_RUNNING_PROCESS_RUNNER_ENABLED = "webAppEmbedded.longRunningProcessRunner.enabled"; public static final String WEB_APP_EMBEDDED_LONG_RUNNING_PROCESS_RUNNER_THREAD_COUNT = "webAppEmbedded.longRunningProcessRunner.threadCount"; public static final String WEB_APP_EMBEDDED_GRAPH_PROPERTY_WORKER_RUNNER_ENABLED = "webAppEmbedded.graphPropertyWorkerRunner.enabled"; public static final String WEB_APP_EMBEDDED_GRAPH_PROPERTY_WORKER_RUNNER_THREAD_COUNT = "webAppEmbedded.graphPropertyWorkerRunner.threadCount"; public static final String USER_NOTIFICATION_REPOSITORY = "repository.userNotification";
<<<<<<< import com.facebook.AccessToken; import com.facebook.CallbackManager; import com.facebook.FacebookCallback; import com.facebook.FacebookException; ======= import com.facebook.AccessToken; import com.facebook.CallbackManager; import com.facebook.FacebookAuthorizationException; import com.facebook.FacebookCallback; import com.facebook.FacebookException; >>>>>>> import com.facebook.AccessToken; import com.facebook.CallbackManager; import com.facebook.FacebookAuthorizationException; import com.facebook.FacebookCallback; import com.facebook.FacebookException; <<<<<<< callbackManager = CallbackManager.Factory.create(); LoginManager.getInstance().registerCallback(callbackManager, new FacebookCallback<LoginResult>() { @Override public void onSuccess(@NonNull final LoginResult result) { presenter.inputs.facebookAccessToken(result.getAccessToken().getToken()); } @Override public void onCancel() { // continue } @Override public void onError(@NonNull final FacebookException error) { // continue, for now } }); addSubscription( presenter.errors.confirmFacebookSignupError() .observeOn(AndroidSchedulers.mainThread()) .subscribe(this::startFacebookConfirmationActivity) ); addSubscription( presenter.errors.tfaChallenge() .observeOn(AndroidSchedulers.mainThread()) .subscribe(__ -> startTwoFactorActivity(true)) ); addSubscription( errorMessages() .observeOn(AndroidSchedulers.mainThread()) .subscribe(this::displayToast) ); addSubscription( presenter.outputs.facebookLoginSuccess() .observeOn(AndroidSchedulers.mainThread()) .subscribe(__ -> { onSuccess(forward); }) ); } private Observable<String> errorMessages() { return presenter.errors.missingFacebookEmailError() .map(ObjectUtils.coalesceWith(unableToLoginString)) .mergeWith( presenter.errors.facebookInvalidAccessTokenError() .map(ObjectUtils.coalesceWith(unableToLoginString)) ); ======= callbackManager = CallbackManager.Factory.create(); LoginManager.getInstance().registerCallback(callbackManager, new FacebookCallback<LoginResult>() { @Override public void onSuccess(@NonNull final LoginResult result) { presenter.inputs.facebookAccessToken(result.getAccessToken().getToken()); } @Override public void onCancel() { // continue } @Override public void onError(@NonNull final FacebookException error) { if (error instanceof FacebookAuthorizationException) { presenter.errors.facebookAuthorizationException(error); } } }); addSubscription( presenter.errors.tfaChallenge() .observeOn(AndroidSchedulers.mainThread()) .subscribe(__ -> startTwoFactorActivity(forward, true)) ); addSubscription( errorMessages() .observeOn(AndroidSchedulers.mainThread()) .subscribe(this::displayToast) ); addSubscription( presenter.outputs.facebookLoginSuccess() .observeOn(AndroidSchedulers.mainThread()) .subscribe(__ -> { onSuccess(forward); }) ); } private Observable<String> errorMessages() { return presenter.errors.missingFacebookEmailError() .map(ObjectUtils.coalesceWith(unableToLoginString)) .mergeWith( presenter.errors.facebookInvalidAccessTokenError() .map(ObjectUtils.coalesceWith(unableToLoginString)) ); >>>>>>> callbackManager = CallbackManager.Factory.create(); LoginManager.getInstance().registerCallback(callbackManager, new FacebookCallback<LoginResult>() { @Override public void onSuccess(@NonNull final LoginResult result) { presenter.inputs.facebookAccessToken(result.getAccessToken().getToken()); } @Override public void onCancel() { // continue } @Override public void onError(@NonNull final FacebookException error) { if (error instanceof FacebookAuthorizationException) { presenter.errors.facebookAuthorizationException(error); } } }); addSubscription( presenter.errors.confirmFacebookSignupError() .observeOn(AndroidSchedulers.mainThread()) .subscribe(this::startFacebookConfirmationActivity) ); addSubscription( presenter.errors.tfaChallenge() .observeOn(AndroidSchedulers.mainThread()) .subscribe(__ -> startTwoFactorActivity(true)) ); addSubscription( errorMessages() .observeOn(AndroidSchedulers.mainThread()) .subscribe(this::displayToast) ); addSubscription( presenter.outputs.facebookLoginSuccess() .observeOn(AndroidSchedulers.mainThread()) .subscribe(__ -> { onSuccess(forward); }) ); } private Observable<String> errorMessages() { return presenter.errors.missingFacebookEmailError() .map(ObjectUtils.coalesceWith(unableToLoginString)) .mergeWith( presenter.errors.facebookInvalidAccessTokenError() .map(ObjectUtils.coalesceWith(unableToLoginString)) ); <<<<<<< public void onSuccess(final boolean forward) { if (forward) { setResult(Activity.RESULT_OK); finish(); } else { final Intent intent = new Intent(this, DiscoveryActivity.class) .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); startActivity(intent); } } public void startFacebookConfirmationActivity(@NonNull final ErrorEnvelope.FacebookUser facebookUser) { final Intent intent = new Intent(this, FacebookConfirmationActivity.class) .putExtra(getString(R.string.intent_forward), forward) .putExtra(getString(R.string.intent_facebook_user), facebookUser); if (forward) { startActivityForResult(intent, ActivityRequestCodes.LOGIN_TOUT_ACTIVITY_FACEBOOK_CONFIRMATION_ACTIVITY_FORWARD); } else { startActivity(intent); } startActivityWithTransition(intent, R.anim.slide_in_right, R.anim.fade_out_slide_out_left); } public void startTwoFactorActivity(final boolean isFacebookLogin) { final Intent intent = new Intent(this, TwoFactorActivity.class) .putExtra(getString(R.string.intent_facebook_login), isFacebookLogin) .putExtra(getString(R.string.intent_forward), forward) .putExtra(getString(R.string.intent_facebook_token), AccessToken.getCurrentAccessToken().getToken()); if (forward) { startActivityForResult(intent, ActivityRequestCodes.LOGIN_TOUT_ACTIVITY_TWO_FACTOR_ACTIVITY_FORWARD); } else { startActivity(intent); } overridePendingTransition(R.anim.slide_in_right, R.anim.fade_out_slide_out_left); } ======= public void onSuccess(final boolean forward) { if (forward) { setResult(Activity.RESULT_OK); finish(); } else { final Intent intent = new Intent(this, DiscoveryActivity.class) .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); startActivity(intent); } } public void startTwoFactorActivity(final boolean forward, final boolean isFacebookLogin) { final Intent intent = new Intent(this, TwoFactorActivity.class) .putExtra(getString(R.string.intent_facebook_login), isFacebookLogin) .putExtra(getString(R.string.intent_facebook_token), AccessToken.getCurrentAccessToken().getToken()); if (forward) { startActivityForResult(intent, ActivityRequestCodes.LOGIN_ACTIVITY_TWO_FACTOR_ACTIVITY_FORWARD); } else { startActivity(intent); } overridePendingTransition(R.anim.slide_in_right, R.anim.fade_out_slide_out_left); } >>>>>>> public void onSuccess(final boolean forward) { if (forward) { setResult(Activity.RESULT_OK); finish(); } else { final Intent intent = new Intent(this, DiscoveryActivity.class) .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); startActivity(intent); } } public void startFacebookConfirmationActivity(@NonNull final ErrorEnvelope.FacebookUser facebookUser) { final Intent intent = new Intent(this, FacebookConfirmationActivity.class) .putExtra(getString(R.string.intent_forward), forward) .putExtra(getString(R.string.intent_facebook_user), facebookUser); if (forward) { startActivityForResult(intent, ActivityRequestCodes.LOGIN_TOUT_ACTIVITY_FACEBOOK_CONFIRMATION_ACTIVITY_FORWARD); } else { startActivity(intent); } startActivityWithTransition(intent, R.anim.slide_in_right, R.anim.fade_out_slide_out_left); } public void startTwoFactorActivity(final boolean isFacebookLogin) { final Intent intent = new Intent(this, TwoFactorActivity.class) .putExtra(getString(R.string.intent_facebook_login), isFacebookLogin) .putExtra(getString(R.string.intent_forward), forward) .putExtra(getString(R.string.intent_facebook_token), AccessToken.getCurrentAccessToken().getToken()); if (forward) { startActivityForResult(intent, ActivityRequestCodes.LOGIN_TOUT_ACTIVITY_TWO_FACTOR_ACTIVITY_FORWARD); } else { startActivity(intent); } overridePendingTransition(R.anim.slide_in_right, R.anim.fade_out_slide_out_left); }
<<<<<<< return MAGIC; } public @NonNull String refTagSuffix() { switch (this) { case MAGIC: return ""; case POPULAR: return "_popular"; case ENDING_SOON: return "_ending_soon"; case NEWEST: return "_popular"; case MOST_FUNDED: return "_most_funded"; default: return ""; } ======= return null; } } public enum State { STARTED, SUBMITTED, LIVE, SUCCESSFUL, CANCELED, FAILED; @Override public @NonNull String toString() { return name().toLowerCase(); } public static @Nullable State fromString(final @NonNull String string) { switch (string) { case "started": return STARTED; case "submitted": return SUBMITTED; case "live": return LIVE; case "successful": return SUCCESSFUL; case "canceled": return CANCELED; case "failed": return FAILED; } return null; >>>>>>> return MAGIC; } public @NonNull String refTagSuffix() { switch (this) { case MAGIC: return ""; case POPULAR: return "_popular"; case ENDING_SOON: return "_ending_soon"; case NEWEST: return "_popular"; case MOST_FUNDED: return "_most_funded"; default: return ""; } } } public enum State { STARTED, SUBMITTED, LIVE, SUCCESSFUL, CANCELED, FAILED; @Override public @NonNull String toString() { return name().toLowerCase(); } public static @Nullable State fromString(final @NonNull String string) { switch (string) { case "started": return STARTED; case "submitted": return SUBMITTED; case "live": return LIVE; case "successful": return SUCCESSFUL; case "canceled": return CANCELED; case "failed": return FAILED; } return null;
<<<<<<< public final class DiscoveryActivity extends BaseActivity<DiscoveryViewModel> { private DiscoveryAdapter adapter; ======= public final class DiscoveryActivity extends BaseActivity<DiscoveryViewModel> implements DiscoveryAdapter.Delegate { >>>>>>> public final class DiscoveryActivity extends BaseActivity<DiscoveryViewModel> { <<<<<<< adapter = new DiscoveryAdapter(viewModel); ======= final LinearLayoutManager layoutManager = new LinearLayoutManager(this); final DiscoveryAdapter adapter = new DiscoveryAdapter(this); recyclerView.setLayoutManager(layoutManager); >>>>>>> final DiscoveryAdapter adapter = new DiscoveryAdapter(viewModel);
<<<<<<< void inject(LoginToutPresenter __); ======= void inject(MessageService __); >>>>>>> void inject(LoginToutPresenter __); void inject(MessageService __);
<<<<<<< @BindString(R.string.Unable_to_login) String unableToLoginString; ======= @BindString(R.string.intent_login_type) String intentLoginTypeString; >>>>>>> @BindString(R.string.Unable_to_login) String unableToLoginString; @BindString(R.string.intent_login_type) String intentLoginTypeString; <<<<<<< callbackManager = CallbackManager.Factory.create(); LoginManager.getInstance().registerCallback(callbackManager, new FacebookCallback<LoginResult>() { @Override public void onSuccess(@NonNull final LoginResult result) { presenter.inputs.facebookAccessToken(result.getAccessToken().getToken()); } @Override public void onCancel() { // continue } @Override public void onError(@NonNull final FacebookException error) { // continue, for now } }); addSubscription( presenter.errors.tfaChallenge() .observeOn(AndroidSchedulers.mainThread()) .subscribe(__ -> startTwoFactorActivity(forward, true)) ); addSubscription( errorMessages() .observeOn(AndroidSchedulers.mainThread()) .subscribe(this::displayToast) ); addSubscription( presenter.outputs.facebookLoginSuccess() .observeOn(AndroidSchedulers.mainThread()) .subscribe(__ -> { onSuccess(forward); }) ); } private Observable<String> errorMessages() { return presenter.errors.missingFacebookEmailError() .map(ObjectUtils.coalesceWith(unableToLoginString)) .mergeWith( presenter.errors.facebookInvalidAccessTokenError() .map(ObjectUtils.coalesceWith(unableToLoginString)) ); ======= presenter.inputs.reason(getIntent().getStringExtra(intentLoginTypeString)); >>>>>>> presenter.inputs.reason(getIntent().getStringExtra(intentLoginTypeString)); callbackManager = CallbackManager.Factory.create(); LoginManager.getInstance().registerCallback(callbackManager, new FacebookCallback<LoginResult>() { @Override public void onSuccess(@NonNull final LoginResult result) { presenter.inputs.facebookAccessToken(result.getAccessToken().getToken()); } @Override public void onCancel() { // continue } @Override public void onError(@NonNull final FacebookException error) { // continue, for now } }); addSubscription( presenter.errors.tfaChallenge() .observeOn(AndroidSchedulers.mainThread()) .subscribe(__ -> startTwoFactorActivity(forward, true)) ); addSubscription( errorMessages() .observeOn(AndroidSchedulers.mainThread()) .subscribe(this::displayToast) ); addSubscription( presenter.outputs.facebookLoginSuccess() .observeOn(AndroidSchedulers.mainThread()) .subscribe(__ -> { onSuccess(forward); }) ); } private Observable<String> errorMessages() { return presenter.errors.missingFacebookEmailError() .map(ObjectUtils.coalesceWith(unableToLoginString)) .mergeWith( presenter.errors.facebookInvalidAccessTokenError() .map(ObjectUtils.coalesceWith(unableToLoginString)) );
<<<<<<< import com.kickstarter.libs.utils.ProjectUtils; import com.kickstarter.libs.utils.ViewUtils; ======= import com.kickstarter.libs.transformations.CircleTransformation; import com.kickstarter.libs.utils.StringUtils; >>>>>>> import com.kickstarter.libs.transformations.CircleTransformation; import com.kickstarter.libs.utils.ProjectUtils; import com.kickstarter.libs.utils.StringUtils; <<<<<<< protected @Bind(R.id.deadline_countdown_text_view) TextView deadlineCountdownTextView; protected @Bind(R.id.deadline_countdown_unit_text_view) TextView deadlineCountdownUnitTextView; ======= protected @Bind(R.id.deadline_countdown) TextView deadlineCountdownTextView; protected @Bind(R.id.deadline_countdown_unit) TextView deadlineCountdownUnitTextView; protected @Bind(R.id.featured) TextView featuredTextView; protected @Bind(R.id.featured_group) ViewGroup featuredViewGroup; protected @Bind(R.id.friend_backing_avatar) ImageView friendBackingAvatarImageView; protected @Bind(R.id.friend_backing_message) TextView friendBackingMessageTextView; protected @Bind(R.id.friend_backing_group) ViewGroup friendBackingViewGroup; >>>>>>> protected @Bind(R.id.deadline_countdown) TextView deadlineCountdownTextView; protected @Bind(R.id.deadline_countdown_unit) TextView deadlineCountdownUnitTextView; protected @Bind(R.id.featured) TextView featuredTextView; protected @Bind(R.id.featured_group) ViewGroup featuredViewGroup; protected @Bind(R.id.friend_backing_avatar) ImageView friendBackingAvatarImageView; protected @Bind(R.id.friend_backing_message) TextView friendBackingMessageTextView; protected @Bind(R.id.friend_backing_group) ViewGroup friendBackingViewGroup; <<<<<<< protected @Bind(R.id.goal) TextView goalTextView; protected @Bind(R.id.location) TextView locationTextView; ======= >>>>>>> <<<<<<< deadlineCountdownTextView.setText(Integer.toString(ProjectUtils.deadlineCountdownValue(project))); deadlineCountdownUnitTextView.setText(ProjectUtils.deadlineCountdownDetail(project, view.getContext(), ksString)); locationTextView.setText(project.location().displayableName()); pledgedTextView.setText(money.formattedCurrency(project.pledged(), project.currencyOptions())); ======= deadlineCountdownTextView.setText(Integer.toString(project.deadlineCountdownValue())); deadlineCountdownUnitTextView.setText(project.deadlineCountdownUnit(view.getContext())); >>>>>>> deadlineCountdownTextView.setText(Integer.toString(ProjectUtils.deadlineCountdownValue(project))); deadlineCountdownUnitTextView.setText(ProjectUtils.deadlineCountdownDetail(project, view.getContext(), ksString)); <<<<<<< /* a11y */ final String goalText = money.formattedCurrency(project.goal(), project.currencyOptions(), true); if (ViewUtils.isFontScaleLarge(view.getContext())) { goalTextView.setText(goalText); } else { goalTextView.setText(ksString.format(pledgedOfGoalString, "goal", goalText )); } setStatsContentDescription(); ======= >>>>>>> <<<<<<< public void setStatsContentDescription() { final String backersCountContentDescription = project.formattedBackersCount() + " " + backersString; final String pledgedContentDescription = pledgedTextView.getText() + " " + goalTextView.getText(); final String deadlineCountdownContentDescription = deadlineCountdownTextView.getText() + " " + deadlineCountdownUnitTextView.getText(); ======= public void setProjectMetadataView() { // always show social if (project.isFriendBacking()) { friendBackingViewGroup.setVisibility(View.VISIBLE); >>>>>>> public void setProjectMetadataView() { // always show social if (project.isFriendBacking()) { friendBackingViewGroup.setVisibility(View.VISIBLE);